Map key-value pairs to key-value pairs.

A useful feature that I found missing from Moses. Not sure if this is the best way to implement it though, maybe it would work better as a separate function, e.g. `map_pairs`.