Reland: Improvements to TextView Ctrl-Z undo support

This relands commit 7713d18847c7fe81fb5f34e888aaf8167862f5fd which was
reverted in commit 3ac0bcb095e0067721a5e35d3b4c51e4090842a3.

Original description:
* Undo/redo restores cursor position
* Multiple deletes are consolidated into a single operation
* Don't create undo history for invalid or no-op operations
* Move logic for merging operations into Editor.EditOperation

CTS tests in android.widget.cts.TextViewTest will land separately.

Bug: 19332904
Bug: 19450037
Bug: 19505388
Change-Id: Ice27e3c4e5e421b47be8c4e9964c10844e61b0fc
1 file changed