Fix OnScreenPositionTest#testImeIsNotBehindNavBar for other form factors

This CL rewrites

  OnScreenPositionTest#testImeIsNotBehindNavBar(),

which we added in Android P development cycle [1].

The main motivation of that test was to prevent issues where IMEs were
placed as if there was no nav bar [2], but how the test was
implemented was based on some assumptions about IME-observable insets.

Now that we have a way to test user-perceivable IME visibility [3],
the test is expected to be more robust and compatible if we rewrite it
with InputMethodVisibilityVerifier.

 [1]: I0005aee0259f25c96fb94054535dd945a56e8cfb
      6ff19b02ae5aa75f595a0ebd073b641d6edebf89
 [2]: Bug 11237795, Bug 26984057, Bug 31313118, Bug 33095565,
      Bug 33308065
 [3]: If999aa51fd2e5fd20e9e2d72a7e1dbeb75e3456d
      d7cb355421143641af4cdda38574337cfae3d24c

Bug: 38298890
Bug: 209695046
Fix: 227547330
Bug: 228639659
Test: atest CtsInputMethodTestCases:OnScreenPositionTest
(cherry picked from commit 550573a43a7db8c468fc21a5315198f597a49906)
Change-Id: I3d1e5fdbc9e5bbc134375ce3bd1a1b526e6f8f8e
4 files changed