Save and restore cursor state
Proper cleanup for curses. Exiting via C-c restores terminal.