Fix invalid divider state while rotating

- Sometimes there is no window attached to the app token during a
rotation. In this case, we also want to return a valid dock side, so
we check for hiddenRequested instead of traversing the windows
of an app window token.
- The logic to notify SystemUI about rotation changes never really
worked. Remove the dock side check as the dock side is guaranteed
to change if we change the screen rotation
- Also clean up visibility methods a bit.

Test: Manually tested the interaction when in docked state landscape,
and going home with locked home rotation like 20 times. Also tested
multi-user interaction with docking.

Change-Id: Ibcd181cadc9bc5a97dbd20e67d15bb1c88de5b97
Fixes: 29569499
3 files changed