workflows: task result templates

Adds templated task results for use in Holding Pen.

Before:
![Image]
(https://www.dropbox.com/s/0sryglpxpesfnh9/Selection_002.png?dl=1)
After:
![Image]
(https://www.dropbox.com/s/pfgo4fl8kltgv78/Selection_001.png?dl=1)

Also adds better documentation and other fixes.
Ouch, you are right that this exposes any file. Changed to use `send_from_directory` for now (just to enable the simple temporary file attachment) and we can use a better solution when the RFC on workflow data model (#2153) is fleshed out and we can have common "attached files not added by bibupload yet" interface.