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/picture.cpp b/gm/picture.cpp
index b07a596..5432fc9 100644
--- a/gm/picture.cpp
+++ b/gm/picture.cpp
@@ -39,9 +39,15 @@
 //
 class PictureGM : public skiagm::GM {
 public:
-    PictureGM() : fPicture(make_picture()) {}
+    PictureGM()
+        : fPicture(NULL)
+    {}
 
 protected:
+    void onOnceBeforeDraw() SK_OVERRIDE {
+         fPicture.reset(make_picture());
+    }
+
     SkString onShortName() SK_OVERRIDE {
         return SkString("pictures");
     }