msaa/formats: Adapt test pattern drawing to handle integer formats.

This patch adapts the MSAA "formats" test so that it can draw to
integer framebuffers, by creating 3 instantiations of the
ColorGradientSunburst class, one for testing vec4's (for floating
point and normalized formats), one for testing ivec4's (for signed
integer formats), and one for testing uvec4's (for unsigned integer
formats).

The test determines which ColorGradientSunburst to use by querying
GL_FRAMEBUFFERATTACHMENT_COMPONENT_TYPE.
msaa/formats: Adapt glReadPixels() call to handle integer formats.

This patch adapts the MSAA "formats" test to pass the proper
parameters to glReadPixels() when checking that the proper image has
been rendered.  Since glReadPixels() requires an integral type when
reading pixels from an integer framebuffer, we read the pixels into a
temporary integer buffer and then copy them (using the CPU) into a
floating point buffer for comparison to the reference image.
msaa/formats: Compare integer formats properly.
msaa/formats: Use a scale and offset for testing integer formats.
msaa/formats: Make it possible to specify a test set on the command line.
msaa: Add a function to all.tests for creating MSAA formats tests.
msaa/formats: Fix visualization of RED and RG formats

The switch statement in visualize_image() wasn't properly handling
formats whose base internal format is GL_RED or GL_RG.  As a result,
tests of these formats showed up as a black screen.  This patch addes
switch cases to handle the formats properly.
msaa: Test ARB_texture_rg and ARB_texture_rg-float formats
msaa: Verify accuracy of sRGB MSAA resolves.

From the GL spec, version 4.2, section 4.1.11 (Additional Multisample
Fragment Operations):

    If a framebuffer object is not bound, after all operations have
    been completed on the multisample buffer, the sample values for
    each color in the multisample buffer are combined to produce a
    single color value, and that value is written into the
    corresponding color buffers selected by DrawBuffer or
    DrawBuffers. An implementation may defer the writing of the color
    buffers until a later time, but the state of the framebuffer must
    behave as if the color buffers were updated as each fragment was
    processed. The method of combination is not specified. If the
    framebuffer contains sRGB values, then it is recommended that the
    an average of sample values is computed in a linearized space, as
    for blending (see section 4.1.7).

This patch adds a new "srgb" mode to the MSAA accuracy test, which
verifies that the formula used by the implementation to blend sRGB
samples matches the GL spec's recommendations.  When an "srgb"
accuracy test is requested, the test is modified to do the following
things:

- Render using a buffer format of SRGB8_ALPHA8 instead of RGBA.

- When manually downsampling the reference image, enable
  FRAMEBUFFER_SRGB, so that the data output by the manual downsampler
  gets converted from linear color space into sRGB color space.  This
  ensures that the reference image is generated according to the
  spec's recommendations.

- Convert pixels from sRGB color space to linear color space before
  comparing the test image and the reference image.  This ensures that
  the RMS error is computed in linear color space, so that the RMS
  error computed for sRGB mode is comparable with the RMS error
  computed for linear RGBA color.