DevTools: fix encoding for Copy as cURL
DevTools: fix encoding for Copy as cURL

Before, the 'Copy as cURL' option would escape all characters outside
of a limited range [\x20-\x7e] with ANSI-C `\u` or `\x`. This caused
problems because `\x` does not properly encode Unicode chars outside
of the range (e.g. latin, CJK, emoji).

Instead, this CL treats control codes (C0, C1 sets) as the only
characters that need `\u` escaping, while everything else (except
single quote, backslash, newline) is not escaped.

Bug: 578054
Change-Id: I47301014ebe394bd02eb9f6c60108f4962f331ca
Reviewed-on: https://chromium-review.googlesource.com/1155924
Reviewed-by: Joel Einbinder <bab755abe9fee48fe544272e55f73517d4e4a725@chromium.org>
Reviewed-by: Andrey Lushnikov <73889f071ff743ad62763f13ff61c52ca3ee19d0@chromium.org>
Commit-Queue: Erik Luo <26192f5e05d23e5ee959014fb911d780e566545b@chromium.org>
Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#584664}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 387f83205e24597cbaaf7ea96e6456583d0d5e59
dart-archive/devtools-frontend,dart-archive/devtools-frontend,ChromeDevTools/devtools-frontend,dart-archive/devtools-frontend,ChromeDevTools/devtools-frontend,dart-archive/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend,dart-archive/devtools-frontend,dart-archive/devtools-frontend,ChromeDevTools/devtools-frontend,ChromeDevTools/devtools-frontend