Moved Tornado IOLoop to main() to resolve shutdown issues plus we now use IOLoop to control checks for startup tasks and background commands.
Fixed shutdown to completely stop and close IOLoop.
IOLoop tasks are now started and stopped via regular start and halt sickrage functions allowing us to gracefully exit on shutdown or restart.
Merge remote-tracking branch 'upstream/dev' into dev