It closes all windows; in the case of Tk, this calls the root.destroy()
function, which should prevent the PyEval_RestoreThread error on Win. See
http://mail.python.org/pipermail/python-bugs-list/2002-November/014207.html
This changeset also refactors the close() functionality into
three Gcf methods, fixing a bug (or inconsistency) in which calling
close with a figure number failed to call mpl_disconnect.