Fix issues with glXMakeContextCurrent and glXMakeCurrentReadSGI
Fix issues with glXMakeContextCurrent and glXMakeCurrentReadSGI

There were several bugs in the infrastructure for these two routines.

1. GLX_ALIAS was incorrectly used.  The function and its alias must be
identical!  glXMakeContextCurrent / glXMakeCurrentReadSGI and
MakeContextCurrent had different parameters.  This caused the last
parameter of MakeContextCurrent to get random values.

2. We based the implementation of glXMakeContextCurrent on the manual
page instead of the GLX spec.  The GLX spec says that
glXMakeContextCurrent can be passed a Window as a drawable.  When this
happens, it will behave just like glXMakeCurrentReadSGI or
glXMakeCurrent.

3. If there was a problem finding or creating the DRI drawable,
MakeContextCurrent would crash instead of returning an error.

This commit fixes all three issues, and fixes bug #18367 and bug #19625.

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