Merge the r1482969 group from trunk:

 * r1482969, r1482970
   Fix issue #4366 ("client SEGFAULTs diffing a repos rev in which an
   empty file was added").
   Justification:
     SEGFAULTs are consider rude in polite company.
   Votes:
     +1: cmpilato, philip, rhuijben


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

 * r1482973
   Avoid using predictable temporary filenames based on "tempfile".
   Justification:
     Performance issue if lots of files match.
   Votes:
     +1: philip, rhuijben, cmpilato


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