GTTF: Fix the test launcher's JSON output for non-UTF8-encoded snippets.

There are no guarantees about the encoding of test output. StringValue
requires valid UTF-8. This change escapes the easily readable snippet
and even adds a base64-encoded field in case a deeper debugging is needed.
We shouldn't lose the raw string because it may be critical for debugging
tricky bugs related to character encoding.

BUG=236893
R=sky@chromium.org

Review URL: https://codereview.chromium.org/102673005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240693 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 240693
Revert of https://codereview.chromium.org/112063003/
Reason for revert: RenderTextTest.ElidedText fails on XP Tests (3)

TBR=msw@chromium.org,pkasting@chromium.org,jshin@chromium.org,skanuj@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/103493003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240694 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 240694