Don't destroy thumbnails immediately

The hiding of the thumbnails needs to be synchronized with the hiding
of the app window. Because destroying them immediately destroys them
without being part of the transaction, that can happen earlier than
hiding the surface.

Instead, hide the thumbnail in the transaction first and then put it
into a list to be cleared after the transaction is closed.

Bug: 27275815
Change-Id: I1530262c26c0751e53d218b686c46129f7c7df1d
3 files changed