CURATOR-145: TreeCache should implement maxDepth

Depends on CURATOR-144
I know this wasn't the intent of this PR. But to *really* solve an even larger class of problems, we can make this more flexible. What I'm thinking, instead of hard-coded criteria by depth, is the ability to provide a `Predicate` for filtering parts of the sub-tree that don't need to be cached.

Ideally, the predicate would be applied in a different spot than here. That way we can filter individual nodes out of the cache. (This approach only lets me say "yes, include all of this node's children" or "no, none of its children".)