ENH: Make set_option into a contextmanager that undos itself on __exit__