BibSched: scheduling improvements
- A monotask would be previously blocked on ABOUT TO SLEEP tasks by trying to sleep them repetitively, thus interrupting the scheduler cycle.
- Adds checks to make sure a monotask is never run when other tasks are running.
- Adds checks to make sure we never start more tasks than CFG_BIBSCHED_MAX_NUMBER_CONCURRENT_TASKS.
- The max procs computation was done on a partial list which would sometimes lead to behaviours like having enough resources even though we did not and the task would fail to execute later.
- node_relevant_bibupload_tasks would be missing the sleeping tasks making it so a bibupload could never be woken up.
- Check for available spots in the queue before trying to sleep tasks. (closes #1114)