Fixed the Close Action

Now when we close a window is disposes of it, unless it is the last
window in which case it exits the application. There is also a "close"
menu item under File now that does the same thing, whereas Quit always
exits all open windows. Eventually we will put a check in there to save
any unsaved changes before it closes.