colabutils: Teach memory usage view to diff against another view

We had TreeNode.delta reserved for the diff view, which has been idle in
the previous patches. Let's use it now.

Add a method MemoryUsageView.from_comparison(base, new). In new new
memory usage view the values on nodes are the same as in the 'base'
view, and deltas are what the 'new' view adds to them.

Bug: 473768497
Change-Id: I824732fb2bfd68717aaebe0f9bb4612d27150145
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7402212
Reviewed-by: Anand Ravi <[email protected]>
Commit-Queue: Egor Pasko <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1565226}
NOKEYCHECK=True
GitOrigin-RevId: b362e6163d427d5433b0b3decb645e4b8b52d473
3 files changed