Size docIdsToLoad appropriately in SearchService

Closes #4156
Added test for PR #4157 (deep pagination in a small index)