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 am: 069ec60f20  -s ours
am: 3c374a2ba7  -s ours

Change-Id: Idb3aea9f746535f39b6abe64339c30697473d488