Use raven error handling middleware

Move SENTRY_DSN to the environment; raven.patchGlobal() and
raven.middleware.express() will look there. If it's not present, it
won't be used.
Minor cleanup