Reland https://codereview.chromium.org/629323002 without the assertion that
 caused CrOS problems.  I'll work on enabling that separately.  Original text:

Attempt to re-implement the clampTo() changes in
https://src.chromium.org/viewvc/blink?view=rev&revision=183172 without
regressing performance.

This allows clampTo() to work with more types, fixes compiler warnings, and adds
 a variety of tests to catch various edge cases I encountered during the many
  rounds of implementation attempts.

BUG=81439
TEST=none
TBR=jchaffraix,kochi

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

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