kernel - Fix ps/thread-exit and other related ps races
* Adjust sysctl_kern_proc()'s kernel thread scanning code to use a marker
instead of depending on td remaining on its proper list. Otherwise
blocking conditions can rip td out from under us or move it to another
cpu, potentially resulting in a crash or livelock. Index the scan
backwards to avoid live-locking continuous adds to the list.
* Fix a potential race is the zombie removal code vs a ps, p->p_token was
being released too early.
* Adjust lwkt_exit() to wait for the thread's hold count to drop to zero
so lwkt_hold() works as advertised.