!UPSTREAM: i965/gen7+: Implement fast color clear operation in blorp.

I've verified that this blorp program puts the right data in the MCS
buffer.

TODO:

- Create a field in intel_mipmap_tree to store clear color bits.

- When configuring SURFACE_STATE, copy clear color bits from
  intel_mipmap_tree.

- In brw_blorp_clear_params constructor, if doing a fast clear, store
  appropriate bits in intel_mipmap_tree to represent the clear color.

- Support more than just (0.0, 0.0, 0.0, 0.0) in
  is_color_fast_clear_compatible().
!UPSTREAM: i965/blorp: Expand clear class hierarchy to prepare for RT resolves.

The fragment shaders that to do color clears will be re-used to
perform so-called "render target resolves" (the resolves associated
with fast color clears).  To prepare for that, this patch expands the
class hierarchy for blorp params: brw_blorp_clear_params (which will
be used for both fast and slow color clears) derives from
brw_blorp_const_color_params (which will be used for all blorp
operations where the fragment shader outputs a constant color).

Some other data structures and functions were also renamed to use
"const_color" nomenclature where appropriate.

TODO: Move earlier in series.
i965/blorp: Write blorp code to do render target resolves.

This patch implements the "render target resolve" blorp operation.
This will be needed when a buffer that has experienced a fast color
clear is later used for a purpose other than as a render target
(texturing, glReadPixels, or swapped to the screen).  It resolves any
remaining deferred clear operation that was not taken care of during
normal rendering.

Fortunately not much work is necessary; all we need to do is scale
down the size of the rectangle primitive being emitted, run the
fragment shader with the "Render Target Resolve Enable" bit set, and
ensure that the fragment shader writes to the render target using the
"replicated color" message.  We already have a fragment shader that
does that (the shader that we use for fast color clears), so for
simplicity we re-use it.

I've manually verified that this blorp program has the intended effect
on the color buffer.
i965/gen7+: Ensure that color buffers are resolved when necessary.

This is parallel to the logic used to resolve depth buffers.
i965/gen7+: Ensure that front/back buffers are fast-clear resolved.

We already had code in intel_downsample_for_dri2_flush() for
downsampling front and back buffers when multisampling was in use.
This patch extends that function to perform fast color clear resolves
when necessary.

To account for the additional functionality, the function is renamed
to simply intel_resolve_for_dri2_flush().
!UPSTREAM: i965/gen7+: Allocate MCS buffers for use by fast color clears.

TODO:

- write code to ensure that color resolves happen when necessary

- write code to do fast rather than slow color clears when possible

- Create a bit to keep track of whether a resolve is necessary

- Do we need to do any extra work for window system color buffers?

- In circumstances where SwapBuffers() makes the back buffer contents
  undefined (when is this?), can we save time by doing a pre-emptive
  fast color clear?  (Seems like it would save time by avoiding
  unnecessary reads when rendering causes a cache miss) Note: a lot of
  apps probably do a glClear() as the first operation after a swap, so
  to avoid slowing down those apps, we probably would only want to do
  this if we also were able to detect redundant clears (see above).
!UPSTREAM: Temporary debugging hack to print out contents of MCS buffer
!UPSTREAM: Temporary debugging hack to test RT resolves