public static <T> Stream<List<T>> batchedStreamOf(Stream<T> originalStream, int batchSize) {
        return asStream(new BatchingIterator<>(originalStream.iterator(), batchSize));
    }
Given a {@link Stream}, convert it to a {@link Stream} of batches no greater than the
batchSize.

@param originalStream to convert
@param batchSize      maximum size of a batch
@param <T>            type of items in the stream
@return a stream of batches taken sequentially from the original stream
stroom-util/src/main/java/stroom/util/collections/BatchingIterator.java