Wait more intelligently for CouchDB to start