Address speculative bug in AA edge detection

I was unable to reproduce the linked bug, but the defense-in-depth
is very easy to add, so let's do that math that might overflow
in 64 bit before it gets shifted back down into a definitely safe
range.

While tracing this, I found some runtime asserts that can be
compile time static_asserts and fixed those.

Change-Id: I3ca28f236d078612d2a5e27e8098a48b05fccae4
Bug: 514122986
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1282077
Commit-Queue: Alexis Cruz-Ayala <alexisdavidc@google.com>
Auto-Submit: Kaylee Lubick <kjlubick@google.com>
Reviewed-by: Alexis Cruz-Ayala <alexisdavidc@google.com>
2 files changed