Usergrid 2855 pagingtesting

Fixes an issue with retaining a cursor on an exhausted iterator for future calls.

USERGRID-2862