threads: introduce THREAD_ID_T_NONE