This change allows epochs to be used in CalculateDescendants, which makes the descendant traversal quicker. CalculateDescendants now takes a setEntries parameter so that callers no longer need to call CalculateDescendants in a loop.
The function is basically the same except:
- the single-entry set case is quicker since setDescendants isn’t queried
- the looping calls where setDescendants is used across iterations is removed in favor of just a single call to CalculateDescendants with the set and using an epoch instead of set lookups