Cleanly shutdown zuul scheduler if startup fails

At the moment, sys.exit is used to terminate the scheduler in case
an exception is thrown during startup phase. However, since not
all remaining threads were either daemonized or stopped, sys.exit
waited indefinitely. This change uses Scheduler.stop before exiting
so that all non-daemonized threads are terminated before exit.

Change-Id: I9e1a753e897276b0b0f5c1b5735d05f1cfa8f9f1
2 files changed