BS-10706 : Call API to retrieve failed flow node for each displayed line

- Modify the fillCounters method of the APIProcess to fill the number of the failed cases
- Add unit tests
- Modify the CaseDatastore to count the number of the process instance corresponding to the filters
- Fix the search of the process instance in CaseDatastore to be able to filter on state and (on user or on supervisor) in same time, and when filter on error state, search all process instances (and not just the root)