Avoid using QColor::xxxF functions.

In our usecase, the color is always used as a float so using QColor
(which is ushort) internally adds a lot of pointless conversion.
Enough so that it shows up in profiles as 1-2% each. Not a lot,
but easy to fix.

The compare function is also somewhat simplified. For colors we're
primarily searching for equallity. If that fails, we just need to
provide consistent values, so use the address instead of doing
any fancy calculation.

Change-Id: Icae7e78ed767e802c137bab7fcacff66e9a4bc66
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Avoid redundant QColor::alphaF() calls.

Change-Id: I3694b075e98eab9f3eacf7758881a9473999b46e
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>