HPCC-9333 - Fix possible lost of records in sort

If close to being out of memory, a spilling callback could occur
just as the sort is finishing and preparing it's spill streams.
If that happened, it could lose the last spilt chunk of records

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>