Introduce IME subtype switching auto mode

Create a new RotationList inside InputMethodSubtypeSwitchingController,
enabling switching in either static or recency order and either forwards
or backwards direction. Also introduce a new auto mode for IME subtype
switching, which resolves to recency order for the first switch after a
user action (reset after each switch), and to static order otherwise.
This also handles switching using the hardware keyboard shortcut
to maintain consistency.

Flag: android.view.inputmethod.ime_switcher_revamp
Test: atest InputMethodSubtypeSwitchingControllerTest
Bug: 311791923
Change-Id: I71e3a0f4234f829ca6791cd575fda977bc3df13f
4 files changed