[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):

Change-Id: I8948ad3376610a42374ece6b96d4a1be9c15c198
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@141886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>