Partially rewrite `testPrios` test
This commit partially rewrites the testPrios
queue test, in such a way
that it's now easier to inspect the final schedule and the occurrence of events.
Albeit not perfect, it should be less sensitive to random failures,
like the ones we have been observing on CI.
@anoe Due to the nature of the queue implementation, writing a fault-proof test is quite tricky, because we are relying on the priority of each individual job, but also at the particular time it got submitted, so I suspect we could still encounter some weird corner cases. Having said that, I have tested this particular patch many times locally and it seemed quite robust. Let's reassess if this keep failing, and we can come up with different plan.