fix some O(N) and O(N^2) operations in parallel.map

some left over code from (presumably) when the map partitioning objects
were stateful made the current implemenation O(N^2),
thus crazy slow for much more than a thousand tasks.

A decorator has also been fixed to avoid calling itself more than once in a given context.

Illustration of performance differences:

http://nbviewer.ipython.org/5267262

may close #3106, though it does not address inappropriate load in the controller.