Add global lock for MPI messenger + cleanup