cgl: Fix build error introduced by 0e1ae83

Commit 0e1ae83 added a fatal typo. Fix it with

  s/context_version_major/context_major_version/
  s/context_version_minor/context_mino_version/

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cmake: Fix Mac build error from commit 62a4aab9

Commit 62a4aab9 set the CMake property LINK_INTERFACE_LIBRARIES to empty
for libwaffle, because Debian's packaging tools complained otherwise.
Afterwards, Waffle's CMake neglected to declare the Cocoa library
dependencies for the executables wflinfo, gl_basic, gl_basic_test.
Post-commit, the executables were no longer satisying their Cocoa
dependency transitively through libwaffle.

Fix the build by linking *every* Waffle target to the Cocoa libraries
with a toplevel `link_libraries` directive.

Also, don't unset LINK_INTERFACE_LIBRARIES on the Mac. It causes a CMake
warning that I don't understand.

Signed-off-by: Chad Versace <chad.versace@linux.intel.com>
cgl: use wcore_calloc helper

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cgl: print the libname on error at cgl_dl_close()

The compiler should have pointed out that there is a
modifier but the parameter is missing. This should
resolve the issue.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
cgl: avoid leaking the PixelFormat

According to apple developer page, starting with OS X v10.5 the
pixelformat is reference counted. The object is created at
CGLChoosePixelFormat and should be unrefeferenced via
CGLReleasePixelFormat/CGLDestroyPixelFormat.

The latter two are identical accoring to the documentation.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>