Adding close, __enter__, and __exit__ functions so that treestore can be used with 'with' statement.