HPCC-11063 Refactor doWUQueryFromArchive() of WsWorkunits

Refactor the doWUQueryFromArchive() for better encapsulated. The
default page size is increased to 500.

Signed-off-by: Kevin Wang kevin.wang@lexisnexis.com
HPCC-11063 Revise based on review comments

Signed-off-by: Kevin Wang kevin.wang@lexisnexis.com
HPCC-11063 Change based on review comments

Check access before calling addArchivedWU()
Fix apossible leak in old code

Signed-off-by: Kevin Wang kevin.wang@lexisnexis.com
Merge pull request #5858 from wangkx/h11063a

HPCC-11063 Refactor doWUQueryFromArchive() of WsWorkunits

Reviewed-By: Jake Smith <jake.smith@lexisnexis.com>
Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>