Handle System Bar Inset properly for immersive mode.

If we enter immersive mode (that is, SystemBar is hidden due to
transient mode), inset from that system bar is not applied even when it
becomes visible.

To fix this, we are applying window inset to fit ignoring the visibility
of the system bar. Each overlay view can opt-in to use this functionality
by overriding shouldUseStableInsets's return value to true. It can also
use conditionals to change its return value dynamically (e.g. depending
on whether the IME is visible. See NotificationPanelViewController.)

Bug: 169612767
Test: Manual (see screen shots)
Change-Id: I9d0c460bd3b521f9e334c3f7c9d304e68593b6da
5 files changed