Allow custom return types where hard-coded types were used

Affects Avg, Sum, Zip, InnerJoin, OuterJoin, Group, Ungroup, Now