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

Change-Id: Id0ecb8e252b43cc5c77644310e4f8a2968876a37