Expand a stubbed Tree into a one with no stubs in it. You might want to
filter the tree before expanding to save IO. This is the basic
implementation, which may be overriden by some Tree instances (this is
especially true of the Index case).

Unfold a path in a (stubbed) Tree, such that the leaf node of the path is
reachable without crossing any stubs. Moreover, the leaf ought not be a Stub
in the resulting Tree. A non-existent path is expanded as far as it can be.

For every pair of corresponding blobs from the two supplied trees,
evaluate the supplied function and accumulate the results in a list. Hint:
to get IO actions through, just use sequence on the resulting list.
NB. This won't expand any stubs.

For each file in each of the two supplied trees, evaluate the supplied
function (supplying the corresponding file from the other tree, or Nothing)
and accumulate the results in a list. Hint: to get IO actions through, just
use sequence on the resulting list. NB. This won't expand any stubs.

Cautiously extracts differing subtrees from a pair of Trees. It will never
do any unneccessary expanding. Tree hashes are used to cut the comparison as
high up the Tree branches as possible. The result is a pair of trees that do
not share any identical subtrees. They are derived from the first and second
parameters respectively and they are always fully expanded. It might be
advantageous to feed the result into zipFiles or zipTrees.

Lay one tree over another. The resulting Tree will look like the base (1st
parameter) Tree, although any items also present in the overlay Tree will be
taken from the overlay. It is not allowed to overlay a different kind of an
object, nor it is allowed for the overlay to add new objects to base. This
means that the overlay Tree should be a subset of the base Tree (although
any extraneous items will be ignored by the implementation).