Add some new PolyUtils tests.

Also:
* clean up PolyUtils checks to be correct and consistent.
* fix some bugs discovered by the unit tests.

Bug: skia:
Change-Id: I1a8e07d13cb44fecc67344154dc1002f3f910f5d
Reviewed-on: https://skia-review.googlesource.com/138592
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Jim Van Verth <jvanverth@google.com>
diff --git a/gn/tests.gni b/gn/tests.gni
index 2068ae5..7ffbb0b 100644
--- a/gn/tests.gni
+++ b/gn/tests.gni
@@ -173,6 +173,7 @@
   "$_tests/PixelRefTest.cpp",
   "$_tests/Point3Test.cpp",
   "$_tests/PointTest.cpp",
+  "$_tests/PolyUtilsTest.cpp",
   "$_tests/PremulAlphaRoundTripTest.cpp",
   "$_tests/PrimitiveProcessorTest.cpp",
   "$_tests/ProcessorTest.cpp",