Added an API to control the audit manager from the UI plugins. Now the UI plugins control if the Orchestrator should shut down after the last audit finishes.
Fixed bugs found by static analyzers + improved the tests.