DO NOT MERGE libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8 am: 5fce0542b6
am: d0ad14ca21

Change-Id: Id0901a86ea469d664badfee75db32948c88e72f7