i965: refactor blorp clear code in preparation for layered clears.
i965: Fix blorp clear of layered framebuffers.

Fixes piglit test "spec/!OpenGL 3.2/layered-rendering/clear-color".
i965: Fix fast clear of depth buffers.

Fixes piglit test "spec/!OpenGL 3.2/layered-rendering/clear-depth".
!UPSTREAM: main: check texture target when validating layered framebuffers.

From section 4.4.4 (Framebuffer Completeness) of the GL 3.2 spec:

    If any framebuffer attachment is layered, all populated
    attachments must be layered. Additionally, all populated color
    attachments must be from textures of the same target.

We weren't checking that the attachments were from textures of the
same target.

TODO:
- Make a piglit test for this, and validate it on Nvidia.