Reordering includes to put mpi.h before stdio.h.

These changes were required to get the code to compile on
the intel compiler with the intel MPI library, and are the
result of a name clash between the C++ MPI standard and
the C++ standard library.