added support for named aggregations to make generated pipeline more natural.
added test for grouping by an anonymous type