Dust-off SkXMLParser

Hook up SkXMLParser to Expat, such that it can actually parse, err,
XML.

Add a trivial unit test.

R=robertphillips@google.com,reed@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142893006

Review-Url: https://codereview.chromium.org/2142893006
diff --git a/gyp/expat.gyp b/gyp/expat.gyp
index 90f7b02..90e4e44 100644
--- a/gyp/expat.gyp
+++ b/gyp/expat.gyp
@@ -12,9 +12,12 @@
         'cflags': [ '-Wno-missing-field-initializers' ],
         'xcode_settings': { 'WARNING_CFLAGS': [ '-Wno-missing-field-initializers', ], },
         'msvs_disabled_warnings': [4244],
-        'defines': [ 'HAVE_EXPAT_CONFIG_H' ],
+        'defines': [
+            'HAVE_EXPAT_CONFIG_H',
+            'XML_STATIC', # Compile for static linkage.
+        ],
         'include_dirs': [
-             '../third_party/externals/expat',
+            '../third_party/externals/expat',
         ],
         'sources': [
             '../third_party/externals/expat/lib/xmlparse.c',
@@ -22,7 +25,12 @@
             '../third_party/externals/expat/lib/xmltok.c',
         ],
         'direct_dependent_settings': {
-            'include_dirs': [ '../third_party/externals/expat/lib' ],
+            'include_dirs': [
+                '../third_party/externals/expat/lib',
+            ],
+            'defines': [
+                'XML_STATIC',  # Tell dependants to expect static linkage.
+            ],
         },
     }]
 }