couchdb init will now only try to initialise once and uses a locking mechanism. Fixes connection pool maxed out errors.