Add EE support for hash aggregation. Factoring the code to use the same API for serial and hash agg