Make all threads daemonic so they will die with the application.