workflows: holdingpen details page improvements

* Adds 2 new stages for workflow objects error and waiting.

* Better display of workflow definition.

* Display of completed tasks.
It could be cleaner if the client does not know too much about the internals of updating the task history. Meaning that line `483->489` could be part of `obj.update_task_history` function. 

Then you will see that actually this check is duplicated:
```python
if "_task_history" not in self.extra_data:
    self.extra_data["_task_history"] = []
```