TDiff calculates the differences between two tree-like structures. Similar to
Rubys built-in TSort module.
