Support configurable CouchDB connection, and default to test DB when running tests.