Account for IME and screen decors when laying out a resized window.

* Adjust position of target IME resized window if it is been obscured
by the IME.
* Make sure resized window frame is within content frame so it doesn't
extend to the screen decoration regions.

Bug: 19424276
Bug: 19500488
Change-Id: I561338101697e10ea5072ee65a180dd0155d0da4
2 files changed