This refactoring is functionally equivalent, but separates the state of the scheduler into its own class. The interface between the scheduler and the state is defined in a way so that it can be easily replaced with a SQL database or some other storage engine.
Adds sudo user to worker info when available

Many of the jobs I use have to be run as hadoop, so it's impossible to tell from
the user who actually ran the job. This adds sudo_user to the worker info so
that it's easier to tell who's running what. This is very handy when I need to
figure out why a large backfill or test job is running if it's causing a lot of
errors or hogging all the resources.
Merge pull request #487 from Houzz/sudo_user

Adds sudo user to worker info when available
Adds number of workers to worker_info
Adds a worker list view to the visualizer
Merge pull request #488 from Houzz/workers_count

Adds number of workers to worker_info
Merge pull request #446 from spotify/erikbern/scheduler-refactoring

Erikbern/scheduler refactoring
Merge pull request #489 from Houzz/worker_viz

Adds a worker list view to the visualizer
Adds DISABLED status for tasks in scheduler.

Tasks can get the disabled status either through scheduling or from repeated
failures. The scheduler handles disabling via repeated failures, and tasks
disabled this way are automatically re-enabled after a fixed amount of time
or when pruned. This allows tasks that are repeatedly running and blocking
progress on other tasks to be pushed aside until someone can have a look.

Tasks can be set as disabled via the disabled parameter in Task. Tasks with
this parameter set to true have will be scheduled as disabled and will not be
run. This disable can only be removed by setting disabled to false in the task
and re-scheduling it. This makes it easier to stop running broken tasks without
having to manually figure out all upstream dependents and remove those as well.