Extracted 'inner' closure as a pickleable class, ParallelExecutor.

This change addresses the initial concern that the inner closure is not pickleable in #489, but issues still remain that the tasks themselves appear not to be pickleable.