Perform all db maintenance tasks serially

These were being managed individually, since they are logically
distinct, but they require coordinated access to a shared resource (the
db). It's simpler to just run them serially, so we now have a
`perform-db-maintenance!` function, which simply accepts a set of
functions and applies them to the database. This keeps the functions
still primarily distinct, but also runs them the way they need to be
run.

Also reordered the arguments to the db maintenance tasks, since it makes
more sense to partially apply them with a given interval to get a new
maintenance task than to partially apply them with a database.