unit test fixes
Fix Index.stage() to properly delete trees.

When a whole tree is to be removed from the index, the list of DiffEntries given to stage()
contains the entry for the removal of the tree itself followed by the list of all children of
the removed tree. This patch ignores the child entries for any removed tree so the tree is not
re-created automatically later when removing each of the tree children.