core: split TCB from stack

This eliminates problems like #1267 and is architectural easier to
understand.