HPCC-8556 Refactor const char * query functions from helpers

Optimize  getString() calls from codegen separately for varstring versus
string, to keep generated code size to a minimum.

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