Merge the r1628431 group from trunk:

 * r1628431, r1628536, r1628540
   Fix issue #4085, "external can shadow a versioned directory".
   Justification:
     Bug that can lead to a working copy which cannot be updated
     until a directory shadowing an external, which was switched
     to the external's location by the externals handling code,
     is switched back to its original path.
   Notes:
     r1628536 is the fix, r1628431 and r1628540 correct the test.
   Votes:
     +1: stsp, philip, rhuijben


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/1.8.x@1641761 13f79535-47bb-0310-9956-ffa450edef68