Cherry pick [Android] Allow text handles to observe position of "parent" view

Cherry pick of https://codereview.chromium.org/24449007/

Bug: 10892868
Bug: 10562149
Bug: 10723151

Original description:

[Android] Allow text handles to observe position of "parent" view

This adds the class PositionObserver. This class provides a way to
listen for changes to the position of a particular view (and to query
that views current position).

Then, HandleView is updated to use a PositionObserver to keep its
PopupWindow's position up-to-date with the logical "parent" view (
HandleView is logically a child of some other view, but has to use
a PopupWindow outside of the logical parent's view hierarchy).

This is similar to, and influenced by, Android's Editor.java
(https://android.googlesource.com/platform/frameworks/base/+/android-4.3_r3.1/core/java/android/widget/Editor.java).

BUG=b/10562149

Committed:
https://src.chromium.org/viewvc/chrome?view=rev&revision=228594

Change-Id: Ifb8508628a716ee518227a289d89486d191cdced
7 files changed