Make main() the getwork scheduler once everything is set up, so that all app exits use the kill_work and quit paths.