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>
7 files changed