Refactor out workflow scheduling into WorkflowScheduler plugin