(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
(PUP-1029) Update documentation of map function

Updates documentation of the map function to also show examples
of using index/value, key/value.
Merge branch 'master' of https://github.com/puppetlabs/puppet