bunch of low level fixes to the thread code:
bunch of low level fixes to the thread code:

-make the death stack stuff smp safe (had a silly bug)
-fixed another rare smp race with CURR_THREAD macro
-tweaked the thread_exit code to boost the priority of the dying thread
-cleaned up the bail-out code of proc_create_proc

Still doesn't fix a rare crasher, but it does fix at least one other random vm crash (recursive lock being released by another thread, or so it thought)


git-svn-id: fb278a52ad97f7fbef074986829f2c6a2a3c4b34@467 c25cc9d1-44fa-0310-b259-ad778cb1d433

travisg/newos,dioptre/newos,zhouxh1023/newos,zhouxh1023/newos,siraj/newos,siraj/newos,travisg/newos,travisg/newos,siraj/newos,dioptre/newos,dioptre/newos,zhouxh1023/newos,siraj/newos