softer shutdown on Ctrl-C / SIGINT (#1695)
softer shutdown on Ctrl-C / SIGINT (#1695)

Previously if Ctrl-C were pressed, Qt would shut down hard and not give
a chance for plugins to run their `on_close_window` hook. This modifies
the signal handler to emit a Qt signal instead which results in .close
being called on all windows. Note, a direct call to .close is not
appropriate -- even though it is called in main thread, the SIGINT handler
may interrupt execution at any point such as while a critical lock is
held, thus causing a freeze if the window-close hook tries to take same
lock. Hence also the importance of using a QueuedConnection.

Also I had to fix the `close` function here to make a copy, as windows
remove themselves from `.windows` on closing! For some reason it was not
making a 'list modified during iteration' exception, rather it was just
failing to close some windows. Weird.
fyookball/electrum,fyookball/electrum,fyookball/electrum