Break out middleware, change logging

We now log with Logrus (https://github.com/Sirupsen/logrus), and also
store all logs of Error or higher level in a seperate database for later
perusal.  There's now a page that allows viewing and deleting these
logs, and a badge that displays the log count across all the pages.