Implement retry on a failed update because of a document conflict

Used the Cassandra client as a guideline for default values. If a conflict
is detected sleep for 500ms and retry. The number of retry operations to
attempt is set to the property 'couchdb.operationretries' that defaults to
300.