Add the interface for safe GL context wrapping and implement on Mac.

Linux implementation will come next.
Merge pull request #6 from pcwalton/gl-context

Add the interface for safe GL context wrapping and implement on Mac.