Don't silently corrupt revisions that need a format upgrade due to a
background FS upgrade.  See here and the new test case for a detailed
reproduction:

https://mail-archives.apache.org/mod_mbox/subversion-dev/201409.mbox/%3CCABw-3Yfv_N4OcLWbCi-EDv6OphRst%3DZ77p14TxaX92ZcEyhxWw%40mail.gmail.com%3E

To fix this, we need to re-read the format info at the beginning of the
commit procedure.  Provide a private API function to do that.  Finally,
add the test case provided by Ivan.

Reported by: ivan

* subversion/libsvn_fs_fs/fs_fs.h
  (svn_fs_fs__read_format_file): Declare new private API function.

* subversion/libsvn_fs_fs/fs_fs.c
  (svn_fs_fs__read_format_file): Implement it, mostly by taking code out
                                 of ...
  (svn_fs_fs__open): ... this.  Use the new function here instead.

* subversion/libsvn_fs_fs/transaction.c
  (commit_body):  The actual 1-line fix.

* subversion/tests/libsvn_fs/fs-test.c
  (upgrade_while_committing): New test case.
  (test_funcs): Register new test.



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