Closes uncached IndexReaders after single lookup completed

There's an intricate scenario where we need to return the PrimitiveLongIterator
at a place where subsequent filtering will happen outside the method
producing it, but at the same time we need to close an uncached index reader
once the lookup result have been gone through.

For that introduced PrimitiveLongResourceIterator which will be closed similarly
to ResourceIterator in finally block in single(iterator).
Merge pull request #1894 from tinwelint/2.0-close-uncached-index-readers

Closes uncached IndexReaders after single lookup completed