EAGLESIX-812: fixed issues in CursorDocumentSource and the top level aggregate regarding stack sizes and batches.  Added test cases