Clean exit on signal.

S9xExit function is called when a signal is caught. If snes9x is started from an
ssh shell, it can be interrupted by Ctrl-C and was not exiting nicely.