[skottie] Switch to RapidJSON

- pull latest RapidJSON under third_party/externals/rapidjson
  (note: and older RS version is already pulled as part of angle2,
  and it is also checked in G3)

- add a thin Json porting layer (SkottieJson) to isolate RS
  idiosyncrasies

- convert Skottie to use the new helpers

- parse the DOM in-place (based on local experiments this is the
  fastest method)

Ta-da: Skottie now parses JSON ~10x faster!


Change-Id: Ida9099638f88ed025fee83055c8cd8680ee27176
Reviewed-on: https://skia-review.googlesource.com/125744
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/DEPS b/DEPS
index dfaf6bb..e7e8303 100644
--- a/DEPS
+++ b/DEPS
@@ -11,6 +11,7 @@
   "third_party/externals/harfbuzz"      : "https://skia.googlesource.com/third_party/harfbuzz.git@1.4.2",
   "third_party/externals/icu"           : "https://chromium.googlesource.com/chromium/deps/icu.git@ec9c1133693148470ffe2e5e53576998e3650c1d",
   "third_party/externals/imgui"         : "https://skia.googlesource.com/external/github.com/ocornut/imgui.git@6384eee34f08cb7eab8d835043e1738e4adcdf75",
+  # TODO: remove jsoncpp after migrating clients to rapidjson
   "third_party/externals/jsoncpp"       : "https://chromium.googlesource.com/external/github.com/open-source-parsers/jsoncpp.git@1.0.0",
   "third_party/externals/libjpeg-turbo" : "https://skia.googlesource.com/external/github.com/libjpeg-turbo/libjpeg-turbo.git@1.5.3",
   "third_party/externals/libpng"        : "https://skia.googlesource.com/third_party/libpng.git@v1.6.33",
@@ -18,6 +19,7 @@
   "third_party/externals/lua"           : "https://skia.googlesource.com/external/github.com/lua/lua.git@v5-3-4",
   "third_party/externals/microhttpd"    : "https://android.googlesource.com/platform/external/libmicrohttpd@748945ec6f1c67b7efc934ab0808e1d32f2fb98d",
   "third_party/externals/piex"          : "https://android.googlesource.com/platform/external/piex.git@bb217acdca1cc0c16b704669dd6f91a1b509c406",
+  "third_party/externals/rapidjson"     : "https://skia.googlesource.com/external/github.com/Tencent/rapidjson.git@a0910358467432b9b3dee5ad57fe05075fe49b8f",
   "third_party/externals/sdl"           : "https://skia.googlesource.com/third_party/sdl@5d7cfcca344034aff9327f77fc181ae3754e7a90",
   "third_party/externals/sfntly"        : "https://chromium.googlesource.com/external/github.com/googlei18n/sfntly.git@b18b09b6114b9b7fe6fc2f96d8b15e8a72f66916",
   "third_party/externals/spirv-headers" : "https://skia.googlesource.com/external/github.com/KhronosGroup/SPIRV-Headers.git@661ad91124e6af2272afd00f804d8aa276e17107",