SF: Enforce a size limitation on SurfaceTracing

SurfaceTracing records operations of each frame update. It can exhaust
more than 2GB on memory heap in 5 mins if display keeps updating.
Enforce a size limitation on it and stop automatically to prevent memory
and stroage from exhausting.

Bug: b/115434782
Test: adb shell service call SurfaceFlinger 1025 i32 1
Result: SurfaceTracing can be disabled after running for a while.

Change-Id: I52d945f86a7bc501590b7c311f63a6273b9192fd
3 files changed