Make SkColorToHSV and SkHSVToColor "perfect" inverses

For all possible opaque SkColors, make converting to HSV and back return
the original SkColor.

In SkHSVToColor, store values as normalized floats (instead of
converting to byte values) as long as possible.

Add a test that cycles through all opaque SkColors and verifies correct
conversion.

BUG=b/33737498

Change-Id: I7ff61a999a271565a9ffe82ae3c9676fc49d67e3
Reviewed-on: https://skia-review.googlesource.com/6720
Commit-Queue: Leon Scroggins <scroggo@google.com>
Reviewed-by: Ben Wagner <bungeman@google.com>
3 files changed