Support iterating and building a DirCache at the same time
This iterator combines the DirCacheBuilder add-in-order update strategy
with a suitable TreeWalk iterator, allowing entries which the TreeWalk
does not return to the application to be automatically carried into the
new index, and the application to handle the entires which the TreeWalk
does return to it.
This can be used to implement a simple "rm" function which removes one
or more paths from the index, while leaving the rest of the index alone.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>