Make 'svnfsfs load-index' work again.

There are two issues solved here. First, we need to make the
pack / rev file writable before re-writing the index in it.

Second, there seems to be a problem with seek(APR_CUR) after
truncating files on Unix.  There is no true workaround similar
to the flush() issue in the same function, however using APR_END
employs a different code path returning the correct values.

* subversion/libsvn_fs_fs/rev_file.h
  (svn_fs_fs__open_pack_or_rev_file_writable): Declare new internal
                                               API function.

* subversion/libsvn_fs_fs/rev_file.c
  (set_read_only_baton_t,
   set_read_onl): New APR cleanup callback function & parameter
                  to switch the file back to read-only.
  (auto_make_writable): New utility that makes a file temporarily
                        writable.
  (open_pack_or_rev_file): Add WRITABLE flag and grant write access
                           to the rev / pack file as requested.
  (svn_fs_fs__open_pack_or_rev_file): Update caller.
  (svn_fs_fs__open_pack_or_rev_file_writable): Implement new function
                                               similar to the r/o variant.

* subversion/libsvn_fs_fs/transaction.c
  (svn_fs_fs__add_index_data): Although the file pointer is known
                               to be at EOF, we need to use APR_END
                               here due to a bug in APR.  Functionally,
                               both approaches should be equivalent.

* tools/server-side/svnfsfs/load-index-cmd.c
  (load_index): Request a writable file.


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