Closing properly the pool in the Sample function ath the end of the run.
The pool is closed only if it was created by the emcee module