Exponential backoff + reconnect

This is a first cut at a way to do exponential backoffs + reconnection if the database goes down.  It seems to work ok with Postgres, but could probably use a bit of vetting before inclusion.  More work will be needed to make CB do something sensible when the DB is not available, but that's work for some other module.