!UPSTREAM: mesa: Track number of layers in layered framebuffers.

TODO:
- Move earlier
- Use this value (and assertion check it) in blorp stuff
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".
!UPSTREAM: fix meta clear of layered framebuffers

TODO:

- I'm getting an error trying to compile meta shaders because
  gl_PerVertex doesn't match between a 1.10 shader and a 1.50 shader.
  This needs to be fixed first.
Revert "!UPSTREAM: fix meta clear of layered framebuffers"

This reverts commit a40cb3f541f54bb2a22f13222c598d6c01a5afce.