add utility function for dealing with Resource Conflicts when saving documents
changes based on PR
Merge pull request #80 from dimagi/apply-update

add utility function for dealing with Resource Conflicts when saving doc...