libutils/Unicode.cpp: Correct length computation and add checks for utf16->utf8
am: 3411dd4457

Change-Id: I34322210bd7ab90c1986d55f9b444292e76c646a