Updates to the cmake build system

- Updated the configuration variables set by the cmake scripts to use ints
  instead of booleans.
- Updated the detection of GL version and GL extensions, the detection
  is now more strict by default.
- Updated the dependencies/requirements of several examples.
- Fixed a bug in configure.py.
- Added the --debug-config option to configure.py.
- Added detection if the 'library' can be built.