fix slow 2-pane transitions; fix 2-pane animations in portrait

The instant visibility changes on layout after mode changes were
preventing the animations from running. Defer any cases when moving to
invisible state until after the transition is complete.

Move FAB reveal earlier when going CV->TL on 2-pane portrait by
triggering list-visibility-changed manually when entering TL mode. TL-
>CV hides the FAB after transition complete as usual.

Position and animate 2-pane elements after normal layout, since some
size calculations depend on having performed a layout already. Fixes
some FAB-related race conditions I started seeing with the animations
working again. b/17514925 tracks the fact that FAB shouldn't need to
move about in this way in the first place (since it's pretty much always
tethered to TL).

Also short-circuit an infinite loop that triggered continuous relayouts
when an Ad is present. This change reverts to the older logic of only
positioning/animating panels on known layout change events, which also
has the side effect of smoothing out the animation.

Bug: 17477114
Bug: 16818991
Change-Id: Ice1f6b896b9d7dc434debb3c2cf15aec87551ebc
3 files changed