(PUP-1029) Make map function consistent with others

The map function only supported a single argument which made it
impossible to map based on index in an Array, and made in awkward
to map on only hash key or value.

Now the map function accepts either value (as before), or index/value,
or key/value (for hash).
Merge pull request #2337 from hlindberg/pup-1029_map-function-consistency

(PUP-1029) Make map function consistent with others