Mask signals in thread creation and destruction to avoid a segfault
If our signal handler gets called before a thread got a chance to run
PERL_SET_CONTEXT(), the call to get the thread-specific interpreter will
fail, and we'll end up with aTHX == NULL. Prevent this from happening
by blocking most signals right before creating the new thread. This
way, the new thread starts out with most signals blocked, and it
unblocks them when it's ready to handle them.
This required saving the original signal mask somewhere - I put it in
the thread struct.
In several places, PERL_SET_CONTEXT() is called before the target perl
interpreter struct has been fully initialized, so this patch adds code
to block signals around those blocks of code.