Verify we actually have valid utf8 metadata

Before calling NewStringUTF, check that the metadata value is actually
valid utf-8, and replace the offending characters with "?" if it is not.
b/5534491

Change-Id: I43de4307e739ae0b7d4177937ed33aa1dfb90d98
1 file changed