When three or more edges are coincident, the logic needs
to compute the overlapping ranges and combine the winding
into a single destination.

This computes coincidence more rigorously, fixing the
edge cases exposed by this bug.

Also, add the ability to debug and dump pathop structures
from the coincident context.

TBR=reed@google.com
BUG=skia:3651

Review URL: https://codereview.chromium.org/1182493015
diff --git a/tests/PathOpsDebug.cpp b/tests/PathOpsDebug.cpp
index 95f06e5..507d865 100755
--- a/tests/PathOpsDebug.cpp
+++ b/tests/PathOpsDebug.cpp
@@ -13,6 +13,8 @@
 #include "SkOpSegment.h"
 #include "SkString.h"
 
+extern bool FLAGS_runFail;
+
 inline void DebugDumpDouble(double x) {
     if (x == floor(x)) {
         SkDebugf("%.0f", x);
@@ -238,6 +240,26 @@
     return contour->debugSpan(id);
 }
 
+const SkOpAngle* SkPathOpsDebug::DebugCoincidenceAngle(SkOpCoincidence* coin, int id) {
+    return coin->debugAngle(id);
+}
+
+SkOpContour* SkPathOpsDebug::DebugCoincidenceContour(SkOpCoincidence* coin, int id) {
+    return coin->debugContour(id);
+}
+
+const SkOpPtT* SkPathOpsDebug::DebugCoincidencePtT(SkOpCoincidence* coin, int id) {
+    return coin->debugPtT(id);
+}
+
+const SkOpSegment* SkPathOpsDebug::DebugCoincidenceSegment(SkOpCoincidence* coin, int id) {
+    return coin->debugSegment(id);
+}
+
+const SkOpSpanBase* SkPathOpsDebug::DebugCoincidenceSpan(SkOpCoincidence* coin, int id) {
+    return coin->debugSpan(id);
+}
+
 const SkOpAngle* SkPathOpsDebug::DebugPtTAngle(const SkOpPtT* ptT, int id) {
     return ptT->debugAngle(id);
 }
@@ -1119,6 +1141,15 @@
         span->dump();
         span = span->fNext;
     }
+    if (!fTop) {
+        return;
+    }
+    SkDebugf("top:\n");
+    span = fTop;
+    while (span) {
+        span->dump();
+        span = span->fNext;
+    }
 }
 
 void SkOpContour::dump() const {