backend: process actions in regard to their priority
The general idea is to put an integer value to `JobQueue.add_task`'s
`priority` paramenter, then everything works as expected.
For actions this could be straightforward and we could just propagate
the priority value that we got from frontend directly to the `JobQueue`
but because this solution should be reusable for builds and potentially
other separate queues where even backend plays a factor when calculating
the priority value, we decided to address those needs here.
This implementation provides `QueueTask` which is able to compute the
final priority based on preferences of both frontend and backend.
`ActionQueueTask` and all future tasks (e.g. `BuildQueueTask`) should
inherit it and override either `frontend_priority`,
`backend_priority` properties or both.