Reland "Stop using copying SkPath::Iter for convexity and contains checks"

This reverts commit 29c06bc82a6f650715e069ed84d5ae26bb036caf.

Reason for revert: Convexicator::BySign did not handle count <= 3, which
it previously never encountered because a path with leading moveTos
would actually turn into a sequence of moveTo+close by the forceClose
SkPath::Iter so it'd never actually skip anything.

I updated the code so that BySign checks for count <= 3 after we've
skipped leading moveTos. This means computeConvexity's logic can get
a little simpler, just checking isFinite(), calling into BySign, and
then going into the second pass. Previously, it skipped the first pass
if pointCount <= 3 (using the pointCount before leading moveTos were
skipped).

Lastly, I removed SkPathPriv::IsConvex. It was the other user of
BySign but it was only used in PathTest. I figured it's best to have
a single source of convexity definition rather than having two code
paths that both need to implement the same two-pass behavior.

Original change's description:
> Revert "Stop using copying SkPath::Iter for convexity and contains checks"
>
> This reverts commit 37527601577a0468e3d2c5be90a4e6dc2816f546.
>
> Reason for revert: asan failures
>
> Original change's description:
> > Stop using copying SkPath::Iter for convexity and contains checks
> >
> > This also ensures that consecutive moveTos at the start and end of the
> > path do not affect convexity, and updates AutoBoundsUpdate respects
> > that as well.
> >
> > Bug: 1187385
> > Change-Id: I9d9d7ab7f268003ff12e46873d7b98d993db47fe
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/396056
> > Commit-Queue: Michael Ludwig <michaelludwig@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
>
> TBR=csmartdalton@google.com,reed@google.com,michaelludwig@google.com
>
> Change-Id: I46aaca9c709be7124fc3933f5d02f20f5d2b42ea
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1187385
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399376
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>
> Commit-Queue: Michael Ludwig <michaelludwig@google.com>

# Not skipping CQ checks because this is a reland.

Bug: 1187385
Change-Id: I21159915839911225440c2f65da9bbbd22b77ab3
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/399377
Reviewed-by: Chris Dalton <csmartdalton@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
3 files changed