h5xx/attribute.hpp: fix reading of NULL padded strings

The DataType passed to H5::Attribute::read must be consistent with the
actual DataType in the file. In particular, the string padding must be
the same. Instead of constructing a new DataType object, use the one
obtained from H5::Attribute.
attribute::read: fix reading variable-length strings

Variable length datatypes require a different treatment since the HDF5 C
library allocates the memory. See the code in
H5::Attribute::p_read_variable_len() for a reference.