Rewrite NaN checks in terms of SkScalarIsNaN()

We are trying to replace Skia's NaN checker with our own in Mozilla,
so it would be nice to have to patch a single place by making sure
these NaN checks used SkScalarIsNaN().

BUG=skia:

Review URL: https://codereview.chromium.org/809443002
3 files changed