Refactor team schedule update

Pull the common logic for the team schedule update into a library, and
call that within the schedule controllers.