Make TextInput correctly handle multibyte chars.
auto merge of #4255 : ema-fox/servo/textinput, r=jdm