HPCC-11734 Fix efficiency issues with CQuerySetQueriesPager

1) In CQuerySetQueriesPager::getElements(), change the unlocked
connection to /QuerySets to read lock connection. 2) Revise the
getElements() to avoid re-connect to /QuerySets. 3) Revise the
getQueryRegistry() to not double lock the /QuerySets. 4) Revise
getQueryRegistryRoot() to not lock to /QuerySets twice. 5) Only
lock the /QuerySets/QuerySet if a QuerySet ID is specified. At
this time, not many things can be done for server-side matching
because the parent properties of a query node are not reachable
(no 'up' axis support). For example, the parent property Alias
is used to set query's property @activated.

Signed-off-by: wangkx <kevin.wang@lexisnexis.com>
I may move the globalLock to the first line of this method (as old code) so that no other thread can access this method to check/add the same QuerySet. (I assume that, if the RTM_CREATE_ADD is used for the globalLock, no other thread can access QuerySets.) 

Another change I should do is to return the lock to the QuerySet (not to the QuerySets).