First attempt at decoupling stuff

* Authentication, templates, database are in their own packages now
* Prettied up the panic reporting and added file context to show bad
  code inline
* Router is now an http.Handler, removed package-level support for
  subdomains (use an http server frontend for that)
* Numerous other decoupling-related fixes