lwp: Rewrite signal wait code for portability and safety
LWP's use of sigset_t is problematic.
To iterate over a sigset_t, it uses NSIG, which is not portable: BSD
and System V provide it, but it's not POSIX.
To record signals caught, it updates a sigset_t variable from a signal
handler. The variable isn't volatile, because we'd have to cast away
volatile for sigaddset().
Replace sigset_t by an array of signal numbers terminated with 0.
Since lwpInitSigWait() needs to store the signal set for
lwpCatchAwaitedSig() anyway, there is no need to pass it to
lwpSigWait(). Drop its parameter.
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>