kernel - Fix panic during coredump
* multi-threaded coredumps were not stopping all other threads before
attempting to scan the vm_map, resulting in numerous possible panics.
* Add a new process state, SCORE, indicating that a core dump is in progress
and adjust proc_stop() and friends as well as any code which tests the
SSTOP state. SCORE overrides SSTOP.
* The coredump code actively waits for all running threads to stop before
proceeding.
* Prevent a deadlock between a SIGKILL and core dump in progress by
temporarily counting the master exit thread as a stopped thread (which
allows the coredump to proceed and finish).
Reported-by: marino