3593: Another round of hardening Workbench's render_exception.

render_exception was counting on session[:user] to help render the
error page.  We recently excised that, which is turning exceptions
into 500s.  This commit restores the session user object, but uses it
only for error rendering, in keeping with the spirit of the previous
revert.  This commit also defends against more possible failure cases
in render_exception, and adds a basic test for it.
Merge branch '3593-workbench-exception-rendering'

Closes #3593, #3595.