Move all assets and HTML rendering concerns out of core module.

This moves closer to fixing #492, though there are still a few assets
in the portal module that are only used by the admin.

There's also a bit of duplication in the functions that render various
error pages in the new `PortalController` and `AdminController` base
controller traits.