Revert "Removed the iree_thread_join in the cleanup of deferred_work_queue.c" (#18616)

Reverts iree-org/iree#18605
diff --git a/runtime/src/iree/hal/utils/deferred_work_queue.c b/runtime/src/iree/hal/utils/deferred_work_queue.c
index a0214b5..22c229b 100644
--- a/runtime/src/iree/hal/utils/deferred_work_queue.c
+++ b/runtime/src/iree/hal/utils/deferred_work_queue.c
@@ -598,7 +598,10 @@
   // Request the workers to exit.
   iree_hal_deferred_work_queue_request_exit(work_queue);
 
+  iree_thread_join(work_queue->worker_thread);
   iree_thread_release(work_queue->worker_thread);
+
+  iree_thread_join(work_queue->completion_thread);
   iree_thread_release(work_queue->completion_thread);
 
   iree_hal_deferred_work_queue_working_area_deinitialize(