Update IME relative layer if it can be the control target

It handles the case from InputMethodManagerService#reportStartInput
with
Activity <- IME container LastRelativeLayer
 - Base Window
 - Dialog Window <- ImeControlTarget, ImeLayeringTarget

The LastRelativeLayer should update to Dialog window, so IME container
can show above Dialog.

Test: atest ZOrderingTests# \
      testAssignWindowLayers_ForImeOnPopupImeLayeringTarget
Bug: 301134949
Bug: 301261260
Change-Id: I7ab44f7fc4724bcb79cf3f58979de21c143edb34
3 files changed