On the fsfs-format7 branch:  Add support for item containers, that is items
may now contain a collection of other items (e.g. noderevs).  The latter can
no longer be addressed in and read directly from the rev / pack file but
wil require the container item to be read and may *then* be extracted using
a sub-item index value as key.

We extend the index file interface to store (rev,item)->(offset,sub-item)
as log-to-phys mapping and (offset)->(len,type,count,(rev,item)*) for the
phys-to-log mapping.

Index files and pack algorithm now have full container support.  Other parts
will assert (by checking for sub-item==0) that no containers are being used
currently.

* subversion/libsvn_fs_fs/index.h
  (svn_fs_fs__p2l_entry_t): all p2l entries cover a variable list of items
  (svn_fs_fs__l2p_proto_index_add_entry): add sub-item parameter
  (svn_fs_fs__item_offset): return sub-item alongside offset

* subversion/libsvn_fs_fs/index.c
  (l2p_page_t,
   l2p_proto_entry_t): add sub-items to l2p data
  (svn_fs_fs__l2p_proto_index_add_entry): store sub-item as well
  (svn_fs_fs__l2p_index_create): copy sub-items values to final index
  (get_l2p_header_body): clarify a comment
  (get_l2p_page): read sub-items from l2p index file
  (l2p_page_baton_t): add output variables
  (l2p_page_get_offset,
   l2p_page_access_func): return offset *and* sub-item
  (l2p_index_lookup,
   l2p_proto_index_lookup): update
  (svn_fs_fs__p2l_proto_index_add_entry,
   svn_fs_fs__p2l_index_create,
   read_entry): handle sub-item lists in p2l index data
  (svn_fs_fs__item_offset): update
  (svn_fs_fs__serialize_l2p_page,
   svn_fs_fs__deserialize_l2p_page,
   svn_fs_fs__serialize_p2l_page,
   svn_fs_fs__deserialize_p2l_page): add support for the new struct members

* subversion/libsvn_fs_fs/fs_fs.c
  (write_revision_zero): update index files in rev 0 template

* subversion/libsvn_fs_fs/cached_data.c
  (dgb__log_access,
   open_and_seek_revision,
   open_and_seek_transaction): update API callers
  (svn_fs_fs__rev_get_root,
   create_rep_state_body,
   auto_set_start_offset,
   block_read_windows,
   block_read_changes, 
   block_read_noderev,
   block_read): ditto; assert non-container items

* subversion/libsvn_fs_fs/pack.c
  (copy_p2l_entry): new copy utility
  (copy_item_to_temp,
   copy_rep_to_temp,
   copy_node_to_temp): use utility function to duplicate index data
  (add_item_rep_mapping): handle containers with != 1 entry
  (compare_p2l_info,
   compare_p2l_info_rev): sort by first sub-item
  (sort_reps,
   copy_items_from_temp): adapt to struct change
  (write_l2p_index): use a priority queue to cover all container sub-items
  (append_revision): assert that no containers are used in single revs

* subversion/libsvn_fs_fs/recovery.c
  (recover_find_max_ids,
   svn_fs_fs__find_max_ids): adapt to internal API change; 
                             assert() no containers in pre-f7 repos

* subversion/libsvn_fs_fs/transaction.c
  (store_l2p_index_entry,
   rep_write_contents_close,
   write_hash_rep,
   write_hash_delta_rep,
   write_final_rev,
   write_final_changed_path_info,
   commit_body): adapt to API change; don't use containers yet


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/fsfs-format7@1462329 13f79535-47bb-0310-9956-ffa450edef68