HPCC-11940 Avoid multiple control:queries calls for same queryset

The code is backported from: https://github.com/hpcc-systems/
HPCC-Platform/pull/6158.

To get query status, the existing code does control:queries call
for each query. It takes a long time for WUListQueries. This
fix collects unique QuerySetIDs for all of the queries and calls
the control:queries for each unique QuerySetID. Then, set query
status for the queries which belong to the QuerySet.

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
Merge pull request #6263 from wangkx/h11940

HPCC-11940 Avoid multiple control:queries calls for same queryset

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Merge branch 'candidate-4.2.8' into closedown-5.0.x

Conflicts:
	esp/services/ws_workunits/ws_workunitsQuerySets.cpp

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>