Prevent freezes in Chrome when zoomed in

Cause: scrollHeight is integer, while borders are non-integer. Thus
the comparison outerHeigh < scrollHeight + borders was always true
causing an infinite loop.

This could have prevented by using for-loop with limited iterations
or fixed by rounding the borders. However, given that it was written
very inefficiently (polling the same unchanged properties again and
again), I decided to replace the custom implementation with a jquery
plugin.

Choosing a correct plugin among the dozens of mostly unmaintained
candidates wasn't easy. We already had one, jquery.autoresize in
our resources. However it seemed to have the same problem and is
essentially unmaintained.

So I replaced jquery.autoresize with jquery.autosize (MIT licence)
and used the new plugin both in the old editor and in the new
editor replacing the custom implementation. The new plugin has
option for padding that I used to leave space for the insertion
buttons. If I remember correctly this was the only reason why we
made a custom implementation in the first place.

Could also add animations for the size changes but that seemed
unnecessary.

There is one behavioral change compared to our custom implementation:
now the text area also shrinks.

Bug: 47635
Change-Id: Idd1d2f819b994045f26ced5c5022efcf5b058116
Merge "Prevent freezes in Chrome when zoomed in"