Handle IME target change gracefully

App window requests IME, IME would be shown when showSoftInput() is
called from currently IME target.
This CL handles cases when IME target changes after showSoftInput was called
from the initial window and new window has received focus within same
app/task.
This CL also reports current control target on every startInput, which
sets current control target in WM.

Bug: 111084606
Test: atest CtsInputMethodTestCases
      1. Open files app
      2. Tap editor and make sure IME shows.
      3. Open bubbles app.
      4. Create a bubble and try typing in it.
      5. verify IME shows as expected.
Change-Id: I9e8984b7e5aa989a53ece9e2576393f795b9ef94
6 files changed