cogl: Read pixels as per the stored format
By the looks of it, commit 95e9fa10 was taping over an Intel DRI bug that would make it return post-swizzling pixel data on glReadPixels(). There's been reports over time of that commit resulting in wrong colors on other drivers, and lately Mesa >17.3 started showing the same symptoms on Intel.
But texture swizzling works by changing parameters before fragment shaders and reading pixels from an already drawn FBO/texture doesn't involve those. This should thus use pixel_format_to_gl_with_target(), which will result in correctly requesting the same pixel format than the underlying texture, while still considering it BGRA for the upper layers in the swizzling case.
Closes: #72 (closed)