HPCC-11823 Improve efficiency of sorting archived wuid list

Used to be performing a linear walk of list so far and inserting.
Change to gather and post sort.

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

HPCC-11823 Improve efficiency of sorting archived wuid list

Reviewed-By: Kevin Wang <kevin.wang@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>