Revamp IME switcher menu

This revamps the UI of the IME switcher menu, to make it more modern,
and provide a seamless IME and subtype switching experience from the
system, regardless of the selected IME.

This also reworks the internals of the InputMethodMenuController to
decouple it from the InputMethodManagerService, and simplify it where
possible.

Test: atest
  InputMethodManagerTest#testShowInputMethodPicker
  InputMethodManagerTest#testInputMethodPickerSwitchIme
  InputMethodPickerTest#testInputMethodPicker_hidesUntrustedOverlays
  InputMethodPickerTest#testShowInputMethodPicker_noDismissWhenOverlayPopup
  InputMethodPickerTest#testShowImePickerOnExternalDisplay
  ImeInsetsVisibilityTest#testEditTextPositionAndPersistWhenAboveImeWindowShown
  InputMethodServiceLifecycleTest#testImeSwitchingWithoutWindowFocusAfterDisplayOffOnFull
  InputMethodServiceLifecycleTest#testImeSwitchingWithoutWindowFocusAfterDisplayOffOnInstant
Bug: 311791923
Flag: android.view.inputmethod.ime_switcher_revamp
Change-Id: I1005cb6b10682f3e91a7ed847c290fcc206b5faa
16 files changed