Sync'ing FSX with FSFS:
Merge r1588815,1589243,1589250,1589252,1589284,1589368,1589373,
1589376, 1591919 and 1593015 from /subversion/libsvn_fs_fs into
subversion/libsvn_fs_x.  Conflicts were due to the locking code
being moved to transaction.* in FSX.

This ports the locking improvements.

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