BibSched: fix priority for the same sequence id
BibSched: fix priority for the same sequence id

* When normalizing the priority for the same sequence id group,
  take into account not only WAITING tasks, but anything that
  isn't DONE or in ERR state.

Co-authored-by: Jerome Caffaro <48b2bca20d17f7e0da978ba8575800a8c4a84744@cern.ch>
Acked-by: Alessio Deiana <e9659f8978a9408eccc7316f742696808c730d32@cern.ch>

tiborsimko/invenio,tiborsimko/invenio,inveniosoftware/invenio,inveniosoftware/invenio