glx: query w/h via glXQueryDrawable + trap errors

When creating a context vogl queries the size of the associated
drawable. This updates it to use glXQueryDrawable instead of
XGetGeometry in case the application is passing a GLXDrawable e.g.
created via glXCreateWindow which may result in a BadDrawable error with
XGetGeometry.

To be extra careful not to leak an X error from our own internal X
requests back to the application, this also adds some utilities for
trapping X errors within vogl.
Check for negative shader src len ⇒ \0 terminated
consider a 3.1 fwd compat ctx as core-profile too

Forward compatibility implies no deprecated apis and since the
deprecation model was introduced for 3.1 it seems to be equivalent to a
core-profile too.
Allow 'redundant' MakeCurrent to update drawable
Use shared wrapper for safely querying glx drawable size