workflows: new stage for halted

* Adds 'WAITING' stage for halted workflows with
  no action added to them.

 Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: New stage for error

* Adds new stage for objects that encountered an error

Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: detailed workflow task list

* Displays workflow definition and completed tasks in details page.

* Task names to display are chosen from the description attributes
  of the task, if not present from the first line of the docstring,
  if still not present, the function name is finally used.

* Adds a decorator to pass the attributes (docstring, name) of a
  function to its closure.

Tested-by: Jan Aage Lavik <jan.age.lavik@cern.ch>
Signed-off-by: Georgios Papoutsakis <georgios.papoutsakis@cern.ch>
workflows: task history fix

* Fixes a problem with an exception happening when loading the
  task history when workflow no longer exists.

Signed-off-by: Jan Aage Lavik <jan.age.lavik@cern.ch>