[threadpool] Extract ThreadPoolDomain creation from tpdomain_get