cvmfs/cvmfs — pull request #604 by reneme (2014-11-20 14:06:38+00:00)
Title: Refactor: Put CatalogTraversal on Steroids

This puts the `CatalogTraversal` class pretty much on steroids. As it turns out, the garbage collection feature mostly depends on traversing the catalog graph in various different ways. Hence, most of the complexity is hidden here rather than in the actual `GarbageCollector`.

Therefore, the `CatalogTraversal` is now a configurable facility to encapsulate all this:

* Object fetching abstraction (`ObjectFetcher` class)
* Download via HTTP, via local File System or not at all (i.e. testing)
* Ignore missing root catalogs (that have been GC'ed before)
* Configurable traversal strategy (*depth first* vs. *breadth first*)
* Intermediate catalog closing to save file descriptors
* overwritable by 'no_close' to produce a fully linked catalog tree
* Skipping of duplicate catalogs (i.e. nested catalogs in multiple revisions)
* Configurable history traversal
* History depth threshold
* Traversal based on one or all named snapshots in the `History` db
* User code is connected through a callback as before

There is also a unit test set for this functionality that hopefully covers most of it.

**Note:** Based on [Refactor: MockCatalog for Unit Test Suite](https://github.com/cvmfs/cvmfs/pull/603)