Gracefully handle SIGTERM as well as SIGINT, feature #5672

SIGTERM is caught by twisted, so we have to use addSystemEventTrigger()
to pass a custom handler to twisted reactor.

See https://leap.se/code/issues/5672 for more.