fdo#81055: Crash due to inadequate checks for GL version / capabilities

Base line is OpenGL 2.1 + extensions.

GL_ARB_framebuffer_object (part of OpenGL 3.0) for
glGenFramebuffers, glGenRenderbuffers...

GL_ARB_vertex_array_object (part of OpenGL 3.0) for
glGenVertexArrays, glBindVertexArray...

GL_ARB_sampler_objects (part of OpenGL 3.3) for
glGenSamplers, glBindSampler...

(cherry picked from commit 378b1d24a958114eb4484cb10f609f6e482772ec)
(and cherry picked some part of commit 23c876deeb357b6306712ff0586a819176151c15)

Change-Id: I3a3caeab7ef593188ee742c53e6715648bf14f50
Reviewed-on: https://gerrit.libreoffice.org/10440
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>