New variant of git_index_read_tree that fills in the 'total' field of a git_indexer_stats struct as it's walking the tree.