Rewrite MPIPool class to fix cPickle.UnpicklingError bug

For more info, please check this pull request for the `emcee` project: https://github.com/dfm/emcee/pull/115