Implement dynamic IME rotation based on user action

With this CL, the IME rotation order will be updated dynamically
based on user actions on IMEs. Currently only onCommitText is
took into considered.

Imagine that we have the following rotation order.
  [A, B, C, D, E]
If a user action for C is observed, the rotation order will be
updated as follows:
  [C, A, B, D, E]
Then another user action for D updates the rotation order as
follows:
  [D, C, A, B, E]

BUG: 7043015
Change-Id: Ic005b94379f9d847ea87046473ed77d8018d930e
2 files changed