Rewrite MPIPool class to fix cPickle.UnpicklingError bug