BibSched: fixes for multi-node setup

* Kwalitee improvements in bibsched.py.

* Updates the check for the maximum number of running tasks
  in order to only count tasks running on the current node.
  (closes #925)

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibSched: fixes monotasks for multi-node

* In the scheduler we iterate over tasks that can run and
  execute some actions.
  In a multinode setup, monotasks that can run only on one
  node still need to trigger all tasks on all nodes to sleep.
  This patch checks for each task, if it needs to be put to sleep,
  in order to run a monotask on another node.
  (addresses #1304)

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibSched: fixes task chain-sleeping

* In a multinode setup, if there was a monotask scheduled,
  the scheduler was trying to sleep all tasks at every cycle.
  This patch makes sure we only asks once for the tasks to sleep.
  (closes #1304)

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibSched: scheduling algorithm improvements

* Correctly rebuild tasks view when some priorities or runtimes
  are adjusted in a sequenceid set.

* Clearly consider any other task in a sequenceid set when deciding
  whether to start a given task. (closes #1281)

* Optimizes waking-up decisions by not waking up tasks when there are
  other tasks about to go to sleep, since these usually means there
  is some higher priority task incoming, and the current task that could
  be waked up would steal their slot (while immediately be put to sleep
  on the next bibsched iteration).
BibSched: single error reporting

* When using bibsched multinode, each bibsched daemon would report
  errors. This patch checks that we are reporting errors once only.
  (closes #1342)

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibSched: shell output leakage upon task kill

* When we are killing a task the shell is outputting
    /bin/sh foobar. killed
  The result is that the ncurses window becomes messy.
  This patch addresses the issue.
  (closes #1343)

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibSched: kwalitee fixes

* Generally improves code kwalitee.

* Fixes wrong number of parameters in function call.

Co-authored-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibSched: CLI-started tasks host field

* Tasks that are started via the CLI using <task name> <task id>
  are now setting the host field properly.

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibSched: priority in automatic mode

* Allows to change the task priority even when the
  BibSched monitor is running in automatic mode.

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>
BibSched: interface responsiveness improvements

* Forces refresh of rows after doing actions that modify
  them (e.g. deleting a task, changing priority on a task)
  instead of waiting for the first refresh.
  (closes #1303)

Reviewed-by: Samuele Kaplun <samuele.kaplun@cern.ch>