Cleaned up core::init function to use models::Settings as the intialization parameter.
Fixed TaskProcessor to properly check the main event queue when a task does a sleep 0.
Added active TaskProcessor to thread local storage.