hwc: Reset stack invalidation state after Prepare

Currently stack invalidation state is reset in BuildLayerStack().
However, hw_layers_ are reset only in PrepareLayerStack(). If a
draw cycle with 0 app layers happens PrepareLayerStack() is not
called, this causes a mismatch in hw_layers_'s reference to layer
stack and actual layer stack. This change clears the stack
invalidation state only in PrepareLayerStack() and bails out of
dump(). Long-term stack duplication is necessary to avoid these
issues.

Change-Id: I2b630556515456317ca20079c3a5623f89c4033f
CRs-fixed: 2185297
1 file changed