Replace domain_id of thread_t with page_table.
Extract function to initialize tree.