Add support for providing MPI transfer info for more than one variable.

Also return basic MPI datatypes more often instead of derived types.