override getTypeName() instead of using table

This should let getTypeName() and serialization work even
when deserialization factories haven't been registered.

I've made getTypeName() pure virtual like getFactory(),
and moved all the overrides into SK_FLATTENABLE_HOOKS,
cleaning up all the various ways we've done it before.

All the subclasses override getTypeName() and getFactory()
privately, so there should be no need to document them?

Change-Id: I723cb20099d250c2f2a10be266e3aacc6a061937
Reviewed-on: https://skia-review.googlesource.com/c/163543
Reviewed-by: Cary Clark <caryclark@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
diff --git a/src/core/SkDraw_vertices.cpp b/src/core/SkDraw_vertices.cpp
index 31860d4..f1f9ad7 100644
--- a/src/core/SkDraw_vertices.cpp
+++ b/src/core/SkDraw_vertices.cpp
@@ -77,8 +77,6 @@
 
     bool isOpaque() const override { return fIsOpaque; }
 
-    // For serialization.  This will never be called.
-    Factory getFactory() const override { SK_ABORT("not reached"); return nullptr; }
 
 protected:
 #ifdef SK_ENABLE_LEGACY_SHADERCONTEXT
@@ -93,6 +91,10 @@
     }
 
 private:
+    // For serialization.  This will never be called.
+    Factory getFactory() const override { return nullptr; }
+    const char* getTypeName() const override { return nullptr; }
+
     Matrix43 fM43;
     const bool fIsOpaque;