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/simpleaaclip.cpp b/gm/simpleaaclip.cpp
index 950a1c0..8a18f48 100644
--- a/gm/simpleaaclip.cpp
+++ b/gm/simpleaaclip.cpp
@@ -49,7 +49,10 @@
 
     SimpleClipGM(SkGeomTypes geomType)
     : fGeomType(geomType) {
+    }
 
+protected:
+    void onOnceBeforeDraw() SK_OVERRIDE {
         // offset the rects a bit so we get anti-aliasing in the rect case
         fBase.set(100.65f,
                   100.65f,
@@ -64,7 +67,6 @@
         INHERITED::setBGColor(0xFFDDDDDD);
     }
 
-protected:
     void buildRgn(SkAAClip* clip, SkRegion::Op op) {
         clip->setPath(fBasePath, NULL, true);