Refactor scheduler for unit testing. Add unit tests.
This MR introduces unit tests for the scheduler. It does not change any scheduler functionality.
In order to create these unit tests, some refactoring was necessary to separate the UI and state-machine computations from the planning/evaluating/scheduling computations.
The methods tested are part of a new class with only static functions called SchedulerUtils. A future MR may move them to a new file, or reintegrate them as static methods inside of Scheduler. However, I wanted to minimize the changes to facilitate this code review. Once we have an established set of unit tests, it may be easier to do more extensive refactoring.
These changes, and all my MRs, are automatically formatted using Artistic Style, as described in the KStars README.md. I prevented the reformatting of schedulerjob.h, though, as it would have modified virtually every line, and I wanted to make clear what was being changed as part of this MR. After submission of this MR, I would like to follow it up with a formatting-only MR for that file.