Deal with small displays and a cancellation race

Bug: 34824406
Bug: 34949414

Check for unreasonably small display sizes and avoid crashing.

Incomplete fix for a cancellation race in which we write the expression
value back after the evaluation has been cancelled, and possibly
replaced.

Test: Some experiments with manually setting maxChars in redisplay().
Normal unit tests.

Change-Id: I7e11043eb5999bf373d66cc827de83024ef217f0
2 files changed