tests: reduce the use of PIDs in examples and tests
core: rename tcb_t into thread_t