add test for modified field on save failure
only reset doc upon save success
wait for index to test unique failure modified
Merge pull request #2508 from jondavidjohn/save-fail-modified

Reset document only upon save success