If only P_STOPPED_SIG is set but not P_STOPPED_TRACE, then p_xthread
might be NULL. While here, try to adjust some comments to more
clearly document some of the cases.
There are some XXX questions I've added that I'd like some feedback on.
I can either adjust code and/or comments based on feedback. I haven't
run Peter's stress test against this but simple tests in kyua pass.