HPCC-9010 Check query tree branch before using it

When a query is deleted, it's tree branch is removed from the
'queryset' tree. The existing code tries to set the 'suspended'
attribute for the tree branch, which causes the core. This fix
checks the query branch before setting the 'suspended' attribute.

Signed-off-by: Kevin Wang <kevin.wang@lexisnexis.com>