c/map_reduce fixed a bunch of memory leaks (on the map side)
c/map_reduce added mutex to avoid race conditions on pipe