cmake: link vogltest against libGL found during configure
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
glx: also try querying w/h via XGetGeometry

It turns out that there is some inconsistency between drivers over
whether it's ok to pass a vanilla X drawable to glXQueryDrawable or pass
a GLXDrawable from glXCreateWindow to XGetGeometry. glXQueryDrawable has
been also been seen to be inconsistent with mesa and an indirect context
where it may return a size of 0 with no error.

See: https://bugs.freedesktop.org/show_bug.cgi?id=54080