extended pmap with kw args
using closures to test error state
probably fix #3737
get rid of the applicable call in rand(Range1)
Merge pull request #3715 from amitmurthy/amitm/pmap

extended pmap with kw args
Merge pull request #3756 from lindahua/dh/randi1

Get rid of the applicable call in rand(Range1)
Fix #3755

Significantly simpler and shorter than what we had previously. Should
be more maintainable.