Added map_agg aggregation function

This PR implements the ``map_agg`` function (#2014) to aggregate key/value pairs into a single map.
A way to use ``Collectors`` here would be nice, but I got NPE with all the things that I tried when the value was ``null``.