Move rtc_json code from API dir, enable unit test, unmark testonly

This change does three things:
 - Move rtc_json into rtc_base/strings/, a non-API directory more fitting to
   its purpose.
 - Make a target for the currently unused json_unittest.
 - Make the code available for use in non-test code again.

Bug: webrtc:9802
Change-Id: Id964a8a4b47b732a962a364894a4dbd3e7f4650f
Reviewed-on: https://webrtc-review.googlesource.com/103126
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24932}
diff --git a/rtc_base/BUILD.gn b/rtc_base/BUILD.gn
index 8dc98b6..e9efbd1 100644
--- a/rtc_base/BUILD.gn
+++ b/rtc_base/BUILD.gn
@@ -683,11 +683,10 @@
 }
 
 rtc_source_set("rtc_json") {
-  testonly = true
   defines = []
   sources = [
-    "json.cc",
-    "json.h",
+    "strings/json.cc",
+    "strings/json.h",
   ]
   deps = [
     ":stringutils",
@@ -1264,6 +1263,20 @@
     ]
   }
 
+  rtc_source_set("rtc_json_unittests") {
+    testonly = true
+
+    sources = [
+      "strings/json_unittest.cc",
+    ]
+    deps = [
+      ":rtc_base_tests_main",
+      ":rtc_base_tests_utils",
+      ":rtc_json",
+      "../test:test_support",
+    ]
+  }
+
   rtc_source_set("rtc_base_unittests") {
     testonly = true
     defines = []