Generalize pip transitions and assertions

Share code and assertions between the transitions to improve maintainability

Test: atest FlickerTests:com.android.wm.shell.flicker.pip
Bug: 167521849
Change-Id: Ie24ac84e0ffcaa6ef786865b9f5d5220fea4263f
10 files changed