Make switchToInputMethodLocked concurrent multi-user aware

This change is required in order to enable `ime set` shell command.

This code change is an internal refactoring and should not cause
any noticeable issues on surfaces with non-concurrent multi-user IME
enabled.

Bug: 350834650
Test: `adb shell ime set --user 11 com.android.inputmethod.latin/.CarLatinIME` (user 11 is a bg visible user)
Test: presubmit
Flag: EXEMPT refactor
Change-Id: I58edae672be629bdacd4a9a16cc9ad5c8012eea6
1 file changed