workflows: hotfix unittest

* Improves tests stability.

* Simplifies workflow engine.

* Fixes the endlessy working workflow engine bug.

Signed-off-by: Guillaume Lastecoueres <guillaume.lastecoueres@cern.ch>
Co-authored-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
1. Please use capital letter at the beginning of a sentence.
2. What do you think about this kind of docstring: `API for workflow manipulation in the worker.`?