Refactoring of the resize logic.

The previous logic did not consider insets of views.

BUG=313973

Review URL: https://codereview.chromium.org/71013005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236185 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 236185
Observe in views::InputMethodBridge if host IME is destroyed

Sometimes, before the widget and its corresponding input method bridge
is destroyed, the host input method used by the bridge is destroyed.
This can especially happen in unit tests. So, input method bridge should
observe the host input method to avoid calling methods on it if it is
destroyed.

The tests that were disabled because of this issue are re-enabled, too.

BUG=315883

Review URL: https://codereview.chromium.org/58903012

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@236186 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 236186