Fix bubble bar expanded view flicker on unfold

Track the task view visibility state in the expanded view and wait
for it to be visible with a surface created or recreated before
starting the expansion animation.

Previously we removed the task view from its previous parent and
immediately added it to the new expanded view and made it visible.
This caused the task view to flicker and the expanded view background
to be visible while the surface was destroyed and recreated.

Flag: com.android.wm.shell.enable_bubble_bar
Fixes: 374640759
Test: manual
       - have a floating bubble
       - expand it and unfold
       - observe expanded view animates correctly (with a delay)
       - add a new bubble to the bubble bar
       - expand it and observe animation
       - switch bubbles and observe anination
       - fold and add a bubble without expanding it
       - unfold, expand and observe animation
Change-Id: I128eddd5df9ef3b722dc449e214f0961e6ac96cb
5 files changed