Ensures that dependencies have at least as high priority as dependents

This recursively passes priorities down to dependents so if task A depends on task B, task B must have at least as high a priority as A. This avoids situations where extremely high priority tasks only end up running after all the low-priority tasks have finished because it depends on the one that runs last.
OK – makes sense, but I think this logic should be moved into `add_task` since it's fixing an issue that I'd argue has nothing to do with priorities.

Does priority scheduling add a lot of extra delay? It seems like it's amortized `O(1)` time in most cases. (I think there could be perverse cases where you have a long chain of 100 tasks and each one of them has slightly higher priority than the previous, leading to `O(n^2)` time, but I doubt that's ever going to be a concern in reality)

I'm fine to merge this as-is and I can move the case to `add_task` since I'm planning to refactor the scheduler anyway. If you have a unit test lying around, great if you can add it, but no stress. Sorry for being so picky,