The main "connect" and "edit" windows set the "escape-exits" flag, but
that just closed the form without exiting the app, leaving the user
trapped. Fix this by emitting a signal when the form quits, and
catching that. (And now we don't need to watch the "clicked" signal on
the quit buttons, since they have the "exit-on-activate" flag set.)