Clean up query iterators (encapsulate fields in AbstractIterator, etc.)
ISPN-2889 AbstractIterator shouldn't allocate a larger result array than is necessary