Use only integer math for hue comparisons.

This is more than 10x faster than how it started, and over 5x faster
than the previous commit.