Make it possible to call uv_tty_reset_mode() from inside a signal handler. The primary motivation is to make it possible to restore the TTY from inside a SIGINT or SIGTERM signal handler. Fixes #954.