driver-gl: split out parse_gl_version function
driver-gl: split out parse_gl_version function

This splits out the GL version parser code from
cogl-driver-gl.c:_cogl_get_gl_version() so it can also be used for
parsing other gl version strings.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit 66c2e74b9d61669fb5b93cf9a31cc8659a601fdd)

Distrotech/cogl,Distrotech/cogl,Distrotech/cogl,Distrotech/cogl