fuzzer fixes

Fix path bugs exposed by the path fuzzer.

Changes to existing gm and samplecode files defer their calls to construct
SkPath objects until the first draw instead of at test initialization.

Add an experimental call to SkPath to validate the internal SkPathRef.

Fix SkPath::addPoly to set the last moveto after adding a close verb.

Fix stroke to handle failures when computing the unit normal.

Add a unit test for the unit normal failure.

R=reed@google.com

Review URL: https://codereview.chromium.org/953383002
diff --git a/gm/shadows.cpp b/gm/shadows.cpp
index 3ecbdd8..66ad32e 100644
--- a/gm/shadows.cpp
+++ b/gm/shadows.cpp
@@ -28,14 +28,14 @@
     SkPath fCirclePath;
     SkRect fRect;
 
-    ShadowsGM() {
+protected:
+    void onOnceBeforeDraw() SK_OVERRIDE {
         this->setBGColor(0xFFDDDDDD);
         fCirclePath.addCircle(SkIntToScalar(20), SkIntToScalar(20), SkIntToScalar(10) );
         fRect.set(SkIntToScalar(10), SkIntToScalar(10),
                   SkIntToScalar(30), SkIntToScalar(30));
     }
 
-protected:
     virtual SkString onShortName() {
         return SkString("shadows");
     }