Prevents calling MPI_Comm_free after MPI_Finalize.

With OpenMPI there appeared cases where MPI_Comm_free
was called after MPI_Finalize. This was caused by the
destructor of OwnerOverlapCopyCommunication being called
after MPI_Finalize.
This patch moves the destruction out of the main method.
If MPI 2 functionality is available we also check whether
MPI_Finalize was called before freeing the communicator and
only call free if not.