WIP workflows: test teardown fix

* Fixes ordering of objects being deleted in the test teardown.

Reported-by: Jiri Kuncar <jiri.kuncar@cern.ch>
Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Then `Workflow.get(Workflow.module_name == "unit_tests").delete()` will trigger deletes on all dependent models.