signals: rework when CURSIG/issignal can stop a thread for tracing
When tracing a process, it can happen that the thread would get stopped
due to the signal and its tracing. In this case the tracing parent
would get notified and it might choose to let the process to serve the
signal.
However if this stop+trace is happening somewhere deep in the kernel due
to a call to CURSIG(), it might happen that the same signal again is the
cause for a stop+trace cycle because of another call to CURSIG() while
the call stack is unwinding.
Introduce CURSIG_TRACE(), which explicitly allows stopping for tracing
signal delivery. This is only called from userret().
All other instances of CURSIG() may still block/sleep because of SA_STOP
signals, but these invocations may not trace + repost signals.
As such, the only place where trace + repost of signals can happen now
is userret(). Nevertheless, CURSIG() still decides not to ignore a
currently ignored signal and rather lets the kernel unwind until this
signal arrives in the CURSIG_TRACE() called from userret().