Re-organize db vs. routes divide

Route callbacks make database queries. The database module provides a facade for
the database connection, and a couple of decorators.