Tweaked the way debugger decides what is considered an uncaught exception.
Added a workaround for premature sem_wait interruption when debugging.

Some code in Unity doesn't know how to properly deal with EINTR and by
the look of it just logs it as an "error" and proceeds as if the semaphore
is taken. This seems to cause problems especially when debugging since
debugger uses a lot of signals to communicate between threads.