HPCC-10364 Generate mergeAggregate() for hash aggregate if input is grouped

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>