Add bound checks to utf16_to_utf8

Test: ran libaapt2_tests64
Bug: 29250543
Change-Id: I1ebc017af623b6514cf0c493e8cd8e1d59ea26c3
(cherry picked from commit 4781057e78f63e0e99af109cebf3b6a78f4bfbb6)

std::vector<std::string> split(const StringPiece& str, char sep) {
 return splitAndTransform(str, sep, nullptr);
}

std::vector<std::string> split(const StringPiece& str, char sep) {
 return splitAndTransform(str, sep, nullptr);
}
