HPCC-8556 Refactor const char * query functions from helpers

Change queryAlgorithm and queryCluster to complete the set.

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