[path builder] Validate conic weights

Per SkPathBuilder::conicTo() docs:

  If w is not finite, appends kLine_Verb twice to verb array, and
  pt1, pt2 to SkPoint array.

It turns out that we don't actually handle this in SkPathBuilder, which
can lead to non-finite weights sneaking in and triggering asserts later.

Add and explicit check and implement the documented semantics.

Bug: 507785335
Change-Id: I04f353ae5cff9463065b927957a8eb0c0e53747e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1225597
Reviewed-by: Kaylee Lubick <kjlubick@google.com>
Commit-Queue: Florin Malita <fmalita@google.com>
2 files changed