Threads: Added inhibition of thread signals. Some code really doesn't like getting errors thrown (cf code that uses fatal_on_error()), so add a simple way of delaying such errors until the critical section is done. Also makes sure that the thread interrupt signal doesn't get lost.