pub fn add_thread_to_table(thread: &Arc<Thread>)
Add the thread and possibly its process, process group and session to the corresponding tables.