introduce and use a new MpiHelper class

this one should avoid race conditions caused by the undefined order of
singleton destructions in C++. Not sure whether there is really a MPI
library out in the wild that uses singletons, but let's just play safe
here.