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
simplified FriendlyError status handling

we're only operating on `HTTPException`s here, so it's safe to rely on
the `status` semantics
extended friendly error handling to 404s and 405s

unfortunately, this is a bit awkward (note the inline comment)
moved inittialization logic to separate module

this avoids import weirdness while keeping `__init__.py` free of logic
(so things like `setup.py` can use its metadata without worrying about
side-effects or circular import)