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

Change-Id: I04d6546b426dfbab278491d831f8b47ec077839f