NEXUS-7671: Purge causes OOM on large TL

Change to purge in batches, to conserve heap memory.

PR Tested with RSO TL data (11GB). Purge done in around 6 mins reducing TL from 11GB to 680MB. Heap monitored, did not get higher than 300-350 MB (NX 2.11-SNAPSHOT Pro with default mem settings).

Issue
https://issues.sonatype.org/browse/NEXUS-7671

CI
http://bamboo.s/browse/NX-OSSF387
This `if` block can be removed because if `topDocs.scoreDocs.length == 0` is true then the next loop would exit due to `topDocs.scoreDocs.length > 0` being false.