Add additional Sentinel class for generic HDF5 objects.

Added code to automatically close a generic HDF5 object. This corrects some errors
that were being thrown during a unit test and possibly other codes. The real bug
was that the objects were being closed multiple times which is not good.