Register signal.CTRL_C_EVENT handler on Windows

To catch CTRL+C on Windows.
Merge remote-tracking branch 'origin/master' into userdb