Fix
!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.
!UPSTREAM: meta: fix meta clear of layered framebuffers

TODO:
- Improve commit message.
WIP: refactor blorp clearing code in preparation for adding 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".