Bug 973407 - [Messages] Reduce reflows when element heights are updated

1. remove updateElementsHeight() call in messageComposerInputHandler(),
since updateSubjectHeight() already calls it

2. in cancelEdit(), only call updateElementsHeight() if in edit mode

3. in updateElementsHeight(), move code to set input width to 'auto' up
to avoid extra reflow if layout has changed prior to call

Added unit tests for cancelEdit().
Merge pull request #16379 from yor-mozilla-com/fix973407

Bug 973407 - [Messages] Reduce reflows when element heights are updated r=julien