threads: move thread_id_t definition and redefine thrd_t type