[automerger skipped] GpuMem: refactor and add unittest for traverseGpuMemTotals am: 643a4f62e4 am: 2909b02c15 am: 83953ffe57 am: 2e5b693064 -s ours

am skip reason: Change-Id I0b1e92214085eac5f75e7cdf4c00c017c520ff5b with SHA-1 5cd71a2a5f is in history

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1472020

Change-Id: Ie59d841e1636512bd38f4371d8c173625ca3df8b