Fix problems with intel-mpi

The mpich version with intel-mpi has a naming conflict of SEEK_SET
between stdio and the C++ binding of MPI. It would be sufficient
to set MPICH_IGNORE_CXX_SEEK or change the include order, but
given that the C++ binding is deprecated and not used it seems
more constistent to simply disable the MPI C++ binding as a whole.

Also moves the #ifdef for lib-mpi/thread-mpi into one file
and thus simplifies the code.

Change-Id: I9702b840f1d1ac51e99b610a7c125d97cda69164