Refine the FSFS f7 pack heuristics away from the container-centric
order used by FSX.  The changes only affect the order of text reps
and noderevs; changed paths lists and properties remain as are.

Sort nodes and the associated reps in ascending path order (used to
be descending order) since this is the "natural" traversal order for
directories and it puts parent folders in front of their children.
Tweak the key for "trunk" and "branch" such that they appear before
any other node.  Now, trunk is the easiest to reconstructand branches
are quicker to access than tags or user-defined paths like "vendor".

Skip-deltas implicitly use a concept of "roundness":  In the non-
linear sections, we always deltify against the rep of the node whose
predecessor count has one more 0 LSBs, e.g. x1B0->x1A0->x180->x100->0.
Thus, the "roundest" node found for each path is the one most
likely to be referenced by deltas in future pack files.  Keeping them
in one section of the pack file will make that section a hot spot for
"foreign" references.

Finally, don't concatenate all noderevs for a given path but put the
noderevs immediately in front of their respective representations,
so the noderev->rep access is less likely to cross a block boundary.

* subversion/libsvn_fs_fs/pack.c
  (path_order_t): Also store the predecessor count as an indicator
                  for "roundness".
  (pack_context_t): Use separate containers for noderev->rep and
                    rep->delta base rep references.
  (initialize_pack_context,
   reset_pack_context): Construct and clean new containers as well.
  (copy_rep_to_temp): Write to the right container.
  (tweak_path_for_ordering): New path meddling function.
  (copy_node_to_temp): Write to the right container, provide the
                       extra path_order_t member and use the tweaked
                       path as sort key.
  (compare_path_order): Yield an ascending path order now.
  (compare_references,
   compare_ref_to_item): Replaced by ...
  (compare_references_to,
   compare_references_from,
   compare_ref_to_item_to,
   compare_ref_to_item_from): ... these two variants with basically the
                             same logic.
  (sort_reps): Implement the roundness heuristics and resolve the
               delta chains, which used to be done in select_reps().
  (find_first_reference,
   is_reference_match): Use to the right container.
  (store_item): Factored out from ...
  (store_items): ... this one.
  (select_reps): Drop.
  (copy_reps_from_temp): Copy nodes in exactly the order suggested
                         by sort_reps().

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