ra_serf: Fix up pool issues and track/clean up empty directories.
ra_serf: Fix up pool issues and track/clean up empty directories.

We can now checkout an extracted httpd tarball without substantial memory leaks.

(We could do without tracking the dirs explicitly; but we'll leave it in so
that it's easy to debug this situation.)

* subversion/libsvn_ra_serf/update.c:
  (report_dir_t): Add a pool for the baton; note our children and siblings.
  (report_context_t): Store a pointer to our root so we can clean up later.
  (push_state): Use calloc instead of alloc; point to ->root_dir or siblings
  as appropriate.
  (open_dir): Create the pool for the baton when we need it.
  (close_dir): Use new pools; when we close, update our parent's children list.
  (close_all_dirs): Walk from the directory and close all children.
  (handle_fetch): Create a sub-pool from the dir_baton for the file and use it.
  (delta_file, fetch_file): Use 'right' pool.
  (finish_report): Always delay closing the dir and ensure they are closed
  in the order we found them (i.e. FIFO); close all children at the end.


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

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