Add container_of macro
core: rename tcb_t in thread_t
 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.