Add correct damage and visible regions for cached buffers.

To ensure that these are reasonably accurate when using caching so that
we're robust to partial update support in composer:

1. Set the visible region to be the union of visible regions for all
cached layers.
2. When the cached set is first created, set the surface damage to be
the cached set. For subsequent frames, set the surface damage to be
empty.

Bug: 183456093
Test: libcompositionengine_test

Change-Id: I2b7b3b4b5630011323a802908c5a80917bdb86ef
12 files changed