cmake build system +  OS X support / cleanups for Humble Release

added the cmake build system config.  it *should* work on linux but I haven't tested yet.

made a few tweaks to silence compiler warnings and fix bugged code.
reworked GL extension usage/fetching