Improve Scheduler algorithm and documentation
Currently, the Scheduler algorithm is poorly documented, hard to understand and sub-optimal in its implementation.
- 
Improve overal documentation;  - 
Improved documentation of getPriorProducersConsumers(); - 
Rename prior.isPrior; - 
It is quadratic in scheduling time.