add function to return datatype name

To implement something like MPI_Type_get_envelope we need to provide an
interface to get the "type" of a datatype from a Datatype*. This is also
usefull for the implementation of resized datatypes, where the pack
function depends on the "type" of the basetype, i.e., if the basetype
was a vector the pack function to be used for the resized ddt is that of
the vector (with changed extent arguments of course).