created FriendlyError middleware

this provides the infrastructure for presenting errors as HTML pages
within the regular layout

caveats:
* doesn't work for 404/405 yet because (annoyingly) Selector's error
  handling takes precedence
* should probably only kick in for 'Accept: text/html'?
* the actual error messages are not very friendly
* there's not much layout and no styling so far, so it's barely
  distinguishable from plain text for now
* various minor issues/uncertainties; see inline comments