Check for non-finite points before transforming them instead of after.

This avoids potentially passing NaN to clampTo(), which will soon become an
assertion failure.

Along the way, this does a few minor cleanups (use || instead of | for logical
OR, don't nest boolean operators).

BUG=417955
TEST=none

Review URL: https://codereview.chromium.org/605073002

git-svn-id: svn://svn.chromium.org/blink/trunk@183090 bbb929c8-8fbe-4397-9dbb-9b2b20218538