datState: If the attribute is missing query the dataset

For external HDF5 files, they won't have the DEFINED? attribute
so we query the dataset directly and ask whether it has been
allocated yet. This would presumably work in general except
I have not yet found a datReset equivalent in the HDF5 API
(short of deleting the dataset and recreating it empty).