core: split TCB from stack

 This eliminates problems like #1267 and is architectural easier to
 understand. I think it will help debugging, too, because you can much
 easier introspect threads at runtime.