Prevent overflow to infinity in constant-folding.

Expressions which would optimize to a non-finite value are now left
as-is.

Integer math still has problems with overflow, but that can be addressed
separately.

Change-Id: I363a2c42684989062f606186f48246b7ac5b585c
Bug: skia:12050
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/412956
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
4 files changed