Fix integer overflow in utf{16,32}_to_utf8_length am: c17624db31 am: 3065de2c86  -s ours am: c282fe5c2c  -s ours am: 47dfd5afee  -s ours
am: fc4b272afe  -s ours

Change-Id: I2bece4ef56298aadb757fbdfdb97f7e52554cdba