Improve signal handling while the debugger is running

I've experienced a problem while running ios-sim with the --debug flag: pressing ^C in the debugger causes ios-sim to exit. This is how you tell lldb to interrupt the running program (e.g., to set a breakpoint), so it's essential that it not terminate execution of the debugger and the program being debugged.

This patch changes ios-sim to ignore SIGINT after the debugger starts. It also modifies ios-sim to exit when the debugger exits.