[Qt] RGB -> BGR is wrong on big endian
https://bugs.webkit.org/show_bug.cgi?id=107560

Reviewed by Jocelyn Turcotte.

Replace the conversion to methods that make it clearer what is going on.
The routines are also optimized compared to the existing by avoiding going
over slow Color constructor.

Tested by existing tests in canvas and fast/canvas.

* platform/graphics/Color.cpp:
(WebCore::colorFromPremultipliedARGB):
    Cleanup.
(WebCore::premultipliedARGBFromColor):
    Cleanup and correct for alpha = 0.
* platform/graphics/Color.h:
(WebCore):
* platform/graphics/qt/ImageBufferQt.cpp:
(WebCore::copyColorToRGBA):
(WebCore::copyRGBAToColor):
(WebCore::getImageData):
(WebCore::ImageBuffer::putByteArray):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141886 268f45cc-cd09-0410-ab3c-d52691b4dbfc