reset signal handlers after they have fired
in an non-interactive IOC, we wait for a SIGINT or SIGTERM to finish. For the asyncio dispatcher, this means we stop the asyncio event loop.
It may, however, happen, that the asyncio event loop refuses to quit. In this case we can only SIGKILL the process, which is unnecessarily brutal. While not quitting the event loop althouggh we ask for it certainly is a bug, bugs like that do happen.
This patch resets the signal handlers for SIGINT and SIGTERM to their default action after we have politely asked the event loop to quit, such that we can insist on quitting later.
For what it's worth, SIGQUIT (bound to Ctrl-\) remains available. This does seem a reasonable patch, will discuss with @AlexanderWells-diamond when he is back.
Doing the same for cothread would involve patching cothread itself, so would not be part of this PR.