Failure healing policies

Generic autoheal workflow + refactor in workflows.py
This was my original attempt but unfortunately the loop I have added requires ctx to have its _node_instances property already assigned to work properly. The _build_workflow_nodes_and_node_instances() method would have to set this property for context instead of returning it, which is a bad design..