HPCC-10735 Support different query classes in the regression suite

Rebase to latest 5.0.x

Signed-off-by: Attila Vamos <attila.vamos@gmail.com>