Added map_agg aggregation function

This PR implements the ``map_agg`` function (#2014) to aggregate key/value pairs into a single map.
This would be easier to read as a plain for-loop, I'll fix this while I merge