Improve hardware keyboard support

Bug: 17188394

- Ensure cursor is always at end of the current expression.
- Allow the delete key to be handled by the EditText fixing an issue
  where delete would occur twice on keyUp and keyDown.
- Prevent text freezing in onSaveInstanceState so that text can be
  restored at the Activity level.

Change-Id: Ie20a7f88b9c43223ae840a1191361de7f1e35127
2 files changed