cgl: Remove bad assertion on unexpected GL context version

If the user requests GL context version neither 1.0 nor 3.2, don't assertion
fail. Instead, just emit an error.

CC: Nigel Stewart <nigels.com@gmail.com>
CC: Jeff Bland <jksb@linux.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Store Mac OS version in cgl_platform

Get Mac OS version with Gestalt and store it in new fields
cgl_platform::system_version_{major,minor}. Will later be used to
detect range of supported OpenGL versions.

chadv: Tested on Mac OS 10.7 Lion.

CC: Nigel Stewart <nigels.com@gmail.com>
CC: Jeff Bland <jksb@linux.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Don't support Mac OS <= 10.4 or != 10.x

To my knowledge, Waffle has never been tested on Mac OS <= 10.4. So it's wise
to mark that as unsupported until someone tests it.

Subsequent commits improve Waffle's handling of
WAFFLE_CONTEXT_MAJOR/MINOR_VERSION, but those improvements require knowledge of
which OpenGL versions are supported by the platform.  I don't know the range of
OpenGL versions supported on Mac OS <= 10.4.  Hence another reason to not
support the older versions.

And Waffle surely doesn't support Mac OS < 10.x .

chadv: Tested on Mac OS 10.7 Lion.

CC: Nigel Stewart <nigels.com@gmail.com>
CC: Jeff Bland <jksb@linux.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Emit error on OS X pre-10.6 on attempt to create 3.2 context (v2)

It's impossible to create a 3.2 context on OS X pre-10.6.
When the user attempts to create a waffle_config with GL version 3.2,
emit an error message explaining that.

Commit df541da fixed the build for pre-10.6, but also introduced an
error. It silently accepted requests for GL version 3.2 which resulted
in creation of a 2.1 (!) context.

chadv: Tested on Mac OS 10.7 Lion.
v2: Add runtime detection of Mac OS version.

CC: Nigel Stewart <nigels.com@gmail.com>
CC: Jeff Bland <jksb@linux.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Handle requested context version more leniently (v2)

Before, Waffle required that the requested context version be exactly
1.0 (the default value), in which Waffle created an OpenGL 2.1 context,
  or be exactly 3.2.

Instead, let's be more lenient when handling the requested context
version by emulating EGL_KHR_create_context. Whatever context version
the user requests, now Waffle returns a context of the highest
backwards-compatible version supported by the system.

chadv: Tested on Mac OS 10.7 Lion.
v2:
  - Fix internal errors when ``1.0 < gl_version <= 2.1``.
  - Add runtime detection of Mac OS version.

CC: Nigel Stewart <nigels.com@gmail.com>
CC: Jeff Bland <jksb@linux.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
tests/gl_basic/cgl: Test various GL context flavors

A recent commit added the CGL backend better support for handling the
requested context version. So, we should now do the same degree of
context flavor testing for CGL that we do for all the other platforms.

Test all OpenGL context versions 1.0 through 3.1; and core and
compatibility profile 3.2 through 4.3.

chadv: Tested on Mac OS 10.7 Lion.

CC: Nigel Stewart <nigels.com@gmail.com>
CC: Jeff Bland <jksb@linux.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>