Fix handling of move tracking when deleting a tree where some subtree was
moved through.

This fixes the move handling for:

$ svn mkdir A A/A
$ svn ci -m ""
$ svn mv A A2
$ svn mv A2/A A
$ svn rm A2
$ svn
$ svn mv A/mu A/NEW/mu

and:

$ svn mkdir --parent A/A/A
$ svn ci -m ""
$ svn mkdir B
$ svn mv A B/A
$ svn mv B/A/A B/AA
$ svn mv B/AA/A AA
$ svn rm B

that before this patch generate an inconsistent database state.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_SELECT_MOVED_FROM_RELPATH): Remove unneeded comment.
    move_to is UNIQUE per working copy.
  (STMT_SELECT_MOVED_FROM_FOR_DELETE): New statement.

* subversion/libsvn_wc/wc_db.c
  (moved_node_t): Add variable.
  (resolve_moved_from): New helper function.
  (delete_node): When deleting a node that is moved through the
    to be deleted tree, properly record that it must be updated.
    Resolve paths of moved nodes when necessary.
    Remove moved from information for the root of the delete.

* subversion/tests/cmdline/move_tests.py
  (move_del_moved): Remove XFail marker.

* subversion/tests/libsvn_wc/op-depth-test.c
  (move_replace_ancestor_with_child): Fix assumption.
  (test_funcs): Remove two XFail markers.


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