HPCC-11666 Make Queries list filterable by referenced library

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
I think this needs to remove any existing libraries associated with the query - otherwise (i) it won't be updated since libCount will be set and ii) any old libraries will still be children.