Resolve the symptoms of issue #3314, 'DAV can overwrite directories during
copy' by actually checking the result of the operations that create new nodes.

The DAV specification and mod_dav say that you get status '201' when a node
is created, but when a node is not created (read overwritten) you get
status 204.

This patch updates libsvn_ra_serf to check the resultcodes with what should
happen and returns an error if something else happens. API usages will then
respond by making the commit fail (and removing the transaction), like on
out of date errors that didn't update the transactions.

* subversion/libsvn_ra_serf/commit.c
  (unexpected_status_error): Add specialized error message for status 204.
  (add_directory): Check http status explicitly.
  (add_file): Introduce scratch pool as the baton might live long. Directly
    create a copy instead of in close_file(). Allow mixed rev overwrite until
    we fixed libsvn_client. Use standard error handling on HEAD request.
  (close_file): Remove copy handling. Verify status of request.

* subversion/tests/cmdline/tree_conflict_tests.py
  (up_sw_dir_add_onto_add): Remove XFail marker.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1553517 13f79535-47bb-0310-9956-ffa450edef68