st/xlib: Honour request of 3.1 contexts through core profile where available.
st/xlib: Honour request of 3.1 contexts through core profile where available.

The GLX_ARB_create_context_profile spec says:

    "If version 3.1 is requested, the context returned may implement
    any of the following versions:

      * Version 3.1. The GL_ARB_compatibility extension may or may not
        be implemented, as determined by the implementation.

      * The core profile of version 3.2 or greater."

Mesa does not support GL_ARB_compatibility, and there are no plans to
ever support it, therefore the only chance to honour a 3.1 context is
through core profile, i.e, the 2nd alternative from the spec.

This change does that.  And with it piglit tests that require 3.1
contexts no longer skip.

Assuming there is no objection with this change, src/glx/dri_common.c
and src/gallium/state_trackers/wgl/stw_context.c should also be updated
accordingly, given they have the same logic.

Reviewed-by: Brian Paul <3cb4e1df5ec4da2c7c4af7c52cec8cf340a55a10@vmware.com>
Reviewed-by: Roland Scheidegger <7d58aee419d6f9201d75517c885374dff5e7d848@vmware.com>

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