Terminate remaining threads on module unload.