Make sure preserved surface is removed when it's no longer needed

Preserved surface might be used for format change as well as surface
size change outside a drag resizing. We currently remove the preserved
surface in prepareSurfaceLocked() after the window is shown, but
sometimes app gets stopped before any animation pass is run.

bug: 28546172
Change-Id: I7f883f4b5c6da4dce70f94173b368a912056d062
2 files changed