Strip font name of special characters before dumping

The font name can contain special characters in some OS that is
considered as delimiters ('/') by the traces. This causes error in the
dump name. This CL strips the fone name obtained before adding it to
traces.

This also adds discardable memory size for resources in cache.

BUG=532838

Review URL: https://codereview.chromium.org/1346993006
diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp
index a1234e1..240d197 100644
--- a/src/core/SkResourceCache.cpp
+++ b/src/core/SkResourceCache.cpp
@@ -679,6 +679,10 @@
     SkDiscardableMemory* discardable = rec.diagnostic_only_getDiscardable();
     if (discardable) {
         dump->setDiscardableMemoryBacking(dumpName.c_str(), *discardable);
+
+        // The discardable memory size will be calculated by dumper, but we also dump what we think
+        // the size of object in memory is irrespective of whether object is live or dead.
+        dump->dumpNumericValue(dumpName.c_str(), "discardable_size", "bytes", rec.bytesUsed());
     } else {
         dump->dumpNumericValue(dumpName.c_str(), "size", "bytes", rec.bytesUsed());
         dump->setMemoryBacking(dumpName.c_str(), "malloc", nullptr);