[GpuStats] Lazily-register statsd callbacks

Previously statsd callbacks were registered when GpuStats was
instantiated. But, statsd is enforcing permissions to verify that the
calling process had permission to register callbacks. The permission
enforcement is happening too early so the callback registration silently
fails. As a workaround, perform callback registration the first time
GpuStats is asked to track stats instead.

Bug: 151682677
Test: builds, boots
Test: adb logcat | grep REGISTER_STATS
Test: adb shell cmd stats pull-source 10054
Test: adb shell cmd stats pull-source 10055
Change-Id: I2d4a4e320825ee5cb393a6560baa8756779b729f
2 files changed