master.py, utils/event.py: reset SIGTERM handler to SIG_DFL

Daemon shutdown with SIGTERM had a race where child processes could be
left orphaned.  The problem was that the signal was delivered to the
master, but then the master would call multiprocess.Process.terminate(),
which would send SIGTERM to the child as well; since the child had the
same data in its Master object, it would also try to go kill all the
child processes, and chaos ensued.

I'd like to have stopped the children from having this sigterm handler
installed by installing it after starting the children, but they are
started inside ReqServer.run(), which doesn't return.

I'd also like to see the SIGTERM handler just set a global flag and poll
that flag in the main loop (doing anything inside the signal handler at
all is dangerous).  But the main loop is inside zmq.device() (which is,
btw, deprecated since libzmq 3.0), and I don't know if there's a zmq
transformation that would allow control to return to the main thread
periodically.

Another possible option is to have the (shared) signal handler only
perform any actual work if it fires on the master process;
that also seems to work, but is a little less elegant.

Fixes: #12248
Signed-off-by: Dan Mick <dan.mick@inktank.com>