PENDING tasks can't be dismissed from tasks page list

Other status may also not be dismissable.
protect against key error
split celery tasks lister into separate function

- Celery tasks exist in session as a dict, but the sesstion_tasks
  function returned them as a list of dicts.  This was a little
  confusing so made it explicit.
- session_tasks_list() now arranges tasks in reverse chrono order.
- Added docstrings for inputs/outputs.