Only notify insets changed caused by z-order under some conditions

The goal of this CL is to improve the performance.

If win.mBehindIme is changed, we will notify the window about insets
changed only when:
- IME is visible.
- The window is visible.

Fix: 159049379
Test: atest InsetsStateControllerTest
Change-Id: I8d38693bfb034c9d12e27d92b7a1d5247768d3e5
3 files changed