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>
Merge pull request #4384 from jakesmith/hpcc-9333

HPCC-9333 - Fix possible lost of records in sort

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>