Fixed #8791 add contextmanager

Added a context manager to HDFStore