fix post aggs with group by in #472

Uses the test case in #592 (with a minor change of using doubles for post aggs instead of longs).
The use of DoubleSumAggregatorFactory here makes be very nervous. Do all PostAggregations HAVE to be doubles? The case I have dealing with nested queries certainly needs to deal with complex metrics (we have some sketch metrics), and I can see in the future wanting to pass a sketch from the inner query to the outer query for further processing.