Implement freeing directory baton using reference counting.
Implement freeing directory baton using reference counting.

* trace-commit.c

(struct dir_baton): New members, subpool and ref_count.
(decrement_dir_ref_count): New function, copied from
  libsvn_ra_local/commit_editor.
(open_root): Create subpool corresponding the directory.  Initialize refcount.
(add_directory): Create subpool.  Initialize refcount.  Increment parent's
  refcount.
(open_directory): Ditto.
(close_directory): Call decrement_dir_ref_count.
(close_file): Ditto.
(add_file): Increase parent's refcount.  Use parent directory's pool.
(open_file): Ditto.

Review by: Karl Fogel <kfogel@collab.net>


git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@841174 13f79535-47bb-0310-9956-ffa450edef68

YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion,wbond/subversion,wbond/subversion,wbond/subversion,YueLinHo/Subversion,YueLinHo/Subversion,wbond/subversion