This method is called to query the user about closing a frame. If it returns #f, the frame will not be closed.
Checks to see if the buffer is saved, and if not queries the user to save it, and possibly saves the buffer.