Improve error logging on replication write failures
Improve error logging on replication write failures

If an error happens when writing a document to the target endpoint,
log it's ID, revision, error and error reason. Also added a few tests
to cover the cases where the target has validate_doc_update functions.



git-svn-id: c1f8a8ec0b3bb2e99ab3413722f81f687760e79c@1129906 13f79535-47bb-0310-9956-ffa450edef68

apache/couchdb-futon,apache/couchdb-futon