HPCC-8556 Refactor const char * query functions from helpers

Return roxiemem-allocated strings rather than having to store in context in
order to release.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>