Issue #14: Fix SIGSEGV by joining the health and worker threads during module deinit.