Re-use code for scanning lucene documents.

o Replace specific interfaces with BoundedIterable where possible.