Fix broken input method context when UIExpandingTextView's height changed

When `UIExpandingTextView`’s height changes, `setMaximumNumberOfLines` is called. The method always changes text property temporarily and restores it; therefore breaking input method context in some languages (e.g. Korean).

This commit prevents it by only doing things when the value is actually changed. It’s not a perfect solution, but it will work in most cases.