vo_gl3: make it work on OpenGL 2.1

Now vo_gl3 should work with standard OpenGL 2.1, as long as the
GL_ARB_texture_rg extension is available. Optional features, which
require features that are always in OpenGL 3.0, but are available
as extensions only in OpenGL 2.1, are automatically disabled.

The force-gl2 suboption, which was an unreliable hack to run vo_gl3
in an OpenGL 2.1 context, is removed.

Significant changes are done to the extension loader to make it easier
to identify optional OpenGL features.

Context creation is a bit changed to simplify the code and to handle
the fallback better if OpenGL 3 context creation fails, and creating
an OpenGL legacy context is attempted.

Based on the initial work by Rudolf Polzer <divverent@xonotic.org>,
which included making the shader GLSL 1.20 compatible, and more.
gl_common: require GLX 1.3 for vo_gl, remove old pre-1.3 code

Now both GL3 (for vo_gl3) and legacy context context creation (for
vo_gl) use the same code to create the X window. Only actual GL context
creation is different.
VO: rename file: vo_gl.c -> vo_opengl_old.c
VO: rename file: vo_gl3.c -> vo_opengl.c
VO: rename file: vo_gl3_shaders.glsl -> vo_opengl_shaders.glsl
VO: actually rename VOs gl -> opengl-old, gl3 -> opengl

This renames vo_gl3 to vo_opengl, and makes it the default. The old
vo_gl is still available under "opengl-old".

We keep "gl3" as alias to "opengl" for short-term compatibility.

For OSX/Cocoa, the autoprobe order changes (prefer the "opengl" over
"opengl-old").

Remove "gl_nosw". This was a compatibility alias for "opengl-old", and
there's no point in keeping it.
vo_opengl: always check GL errors in first 5 frames

Normally, we don't want to call glGetError() all the time, because this
supposedly causes slowdowns. (I could not measure any on Linux with
nVidia binary drivers; maybe it's due to the fact that we have only a
few, expensive calls per frame.)

However, having to ask users to add the "debug" suboption when trying to
diagnose problems is very annoying. Since most errors happen during
initialization only, enabling it for the first 5 frames only is an
interesting compromise.
bstr: add bstr_equals/bstr_equals0 utility function
VO: add mechanism to replace old VO names, use it with "gl" and "gl3"

Rather than duplicating the VO driver structs to add aliases, replace
them textually when searching for the VO on initialization.
vo_opengl: use low quality default settings, add opengl-hq alias

Change the default settings for vo_opengl to highest performance and
compatibility, but lowest quality. Use bilinear as default scaler.

Add "opengl-hq" as alias for high quality settings. This alias uses
exactly the same settings as vo_opengl did before this commit.
vo_opengl: use PBOs by default with opengl-hq

It's not really known whether PBO use causes problems of any kind (most
likely not). They should slightly increase performance. Use them by
default with "opengl-hq".

Even though PBOs don't have anything to do with rendering quality,
"opengl-hq" provides a test bed for features that should be enabled by
default, but aren't out of fear for regressions.
vo_opengl: change default FBO format

GL_RGB16 doesn't seem to work universally (e.g. Intel). Use GL_RGB by
default, and use GL_RGB16 for "opengl-hq" only.

This may require users of Intel GPUs to manually experiment with the
fbo-format suboption when using "opengl-hq", as GL_RGB16 doesn't seem to
work there in some cases (black screen).
vo_opengl: don't try to map an empty buffer

The change detection signalled a full re-upload on initialization, but
no texture reallocation. Binding the uninitialized buffer caused an
OpenGL error.

Fixes error messages on start with "opengl-hq".