mesa/sso: Implement _mesa_UseProgramStages
mesa/sso: Implement _mesa_UseProgramStages

Now arb_separate_shader_object-GetProgramPipelineiv should pass.

V3 (idr):
* Change spec references to core OpenGL versions instead of issues in
  the extension spec.
* Split out from previous uber patch.

v4 (idr): Use _mesa_has_geometry_shaders in _mesa_UseProgramStages to
detect availability of geometry shaders.

v5 (idr): Whitespace cleanup, use _mesa_lookup_shader_program_err
instead of open-coding it again, and update some comments at the end of
_mesa_UseProgramStages.  All suggested by Eric.

Reviewed-by: Ian Romanick <2b237cafb16dc45038e85df6c85e74e6d899eba9@intel.com>
Reviewed-by: Eric Anholt <96f164ad4d9b2b0dacf8ebee2bb1eeb3aa69adf1@anholt.net>

djreep81/glsl-optimizer,bkaradzic/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,dellis1972/glsl-optimizer,bkaradzic/glsl-optimizer,benaadams/glsl-optimizer,wolf96/glsl-optimizer,zz85/glsl-optimizer,djreep81/glsl-optimizer,metora/MesaGLSLCompiler,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,jbarczak/glsl-optimizer,wolf96/glsl-optimizer,dellis1972/glsl-optimizer,benaadams/glsl-optimizer,metora/MesaGLSLCompiler,bkaradzic/glsl-optimizer,djreep81/glsl-optimizer,benaadams/glsl-optimizer,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,wolf96/glsl-optimizer,tokyovigilante/glsl-optimizer,benaadams/glsl-optimizer,mcanthony/glsl-optimizer,zeux/glsl-optimizer,mcanthony/glsl-optimizer,mcanthony/glsl-optimizer,bkaradzic/glsl-optimizer,tokyovigilante/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,zeux/glsl-optimizer,zz85/glsl-optimizer,mcanthony/glsl-optimizer,zz85/glsl-optimizer,zeux/glsl-optimizer,jbarczak/glsl-optimizer,benaadams/glsl-optimizer,benaadams/glsl-optimizer,bkaradzic/glsl-optimizer,dellis1972/glsl-optimizer,metora/MesaGLSLCompiler,djreep81/glsl-optimizer,tokyovigilante/glsl-optimizer,dellis1972/glsl-optimizer,wolf96/glsl-optimizer,zz85/glsl-optimizer