Prioritizes tasks by schedule and priority.
Scheduled tasks are before unscheduled within a single priority.
Priority inheritance: Tasks will inherit any higher priority from tasks that either directly or indirectly must be done after the task. For example, a low priority task that must be done before a high priority task will be treated as high priority.
If dateFirst is
true, will sort by date then priority. Otherwise
sorts by priority then date.