tests/gl_basic: Fix order of CGL tests

The order which test functions are defined should match the order listed
in ${platform}_testsuite.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Fix build, missing semicolon

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Fix assertion failure for unexpected context versions

Out of habit, I accidentally put an assert(0) in a default case
statement. Instead, waffle should just emit an error and continue.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Detect Mac OS version at runtime

Detect the OS version during waffle_init() and store in `struct
cgl_platform`.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Don't support Mac OS <= 10.4

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.

CC: Nigel Stewart <nigels.com@gmail.com>
CC: Jeff Bland <jksb@linux.com>
Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: Simulate EGL in handling context versions

Pre-patch, when built on Mac OS < 10.6, the requested context version
was required to be exactly 1.0; and when built on Mac OS >= 10.6,
exactly 1.0 or 3.2.

Post-patch, emulates EGL_KHR_create_context, which allows the
implementation to return a context of the latest supported flavor that
is backwards-compatibile with the requested flavor.

Piglit tests that request a 3.1 context will require this change.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
tests/gl_basic/cgl: Test various GL context flavors

A recent commit added to CGL better support for handling requested
context flavors. So, we should now do the same degree of testing of
context flavors on 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>
Merge branch 'cgl-context-flavors'

Conflicts:
	src/waffle/cgl/cgl_config.m
	tests/functional/gl_basic_test.c