Fix kill: forward SIGINT and wait after SIGINT/SIGTERM before SIGKILL

This also adds output around the terminate handler, using sys.stderr.