Putting retries on all the functions in CouchDB