HPCC-10374 - Fix sorted loader issue effecting global sort

If global sort had spilt, but 0 rows left in memory when
finished, it would incorrectly return a NULL stream.

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>
Merge pull request #5113 from jakesmith/hpcc-10374

HPCC-10374 - Fix sorted loader issue effecting global sort

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>