Fix integer overflow in utf{16,32}_to_utf8_length
am: c17624db31

Change-Id: I68b3a7dd059de301144d100be632e5803982073f