Close the app and all it's threads on quit.