check for finite before casting to int

A UBSAN bot caught this when turning on skcms_OptimizeForSpeed().
I think it's kind of harmless... presumably the diff would be giant.

Change-Id: I37764d24e0ba536aab3b1c02fe74c219b413013d
Reviewed-on: https://skia-review.googlesource.com/123243
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
1 file changed