HPCC-10465 - Global merge bug if varrecs and late detection

Global merge builds up a local sample of the keys as it performs
the local merge, as it exceeds a threshold, the sample is divided
to keep the size down. If the keys are variable length but fixed
with up to the point when the 1st sample occurs, the file
positions the mechanism is tracking got out of sync.
Consequently, when merging from the spilt key stream, the seek
positions were wrong, which could result in deserialization
errors.

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

HPCC-10465 - Global merge bug if varrecs and late detection

Reviewed-By: Gavin Halliday <gavin.halliday@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>