Support toggling layer caching at runtime

The use-case for this is dynamically enabling and disabling layer
caching when a bad layer state is encountered that is difficult to
reproduce.

Bug: 187448777
Test: adb shell service call SurfaceFlinger 1040 i32 1
Test: libcompositionengine_test
Change-Id: Id441a0894ff5a4c654db9fd706ceb1c0d1c343f0
Merged-In: Id441a0894ff5a4c654db9fd706ceb1c0d1c343f0
9 files changed