Make sure string passed to sendMessageToEmbedder is a valid unicode string

The message passed to the method is a result of JSON.stringify and may contain noncharacter unicode code points (http://www.unicode.org/faq/private_use.html#noncharacters). Since we know that the message is a JSON string we can use \uXXXX escape sequences for bad symbols. The function escapes not only noncharacters which produces valid output and allows to keep implementation simple.

BUG=347899
R=pfeldman@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168448 bbb929c8-8fbe-4397-9dbb-9b2b20218538