ENH: add contextmanager to HDFStore (#8791)

Added a context manager to HDFStore

closes #8791