Merge pull request #69 from vMcJohn/master

Fix windows warnings - All tests passed on linux. Accepting.
Voglreplay refactor.
Replayer: Benchmark mode now defaults to NOT teardown & restore GL context state.
* Cmd line option: --allow_state_teardown has been added to re-enable the teardown & restore when --benchmark is also used.
* Looping behavior outside of benchmark mode has not been changed
cmake: link vogltest against libGL found during configure
glx: query w/h via glXQueryDrawable + trap errors

When creating a context vogl queries the size of the associated
drawable. This updates it to use glXQueryDrawable instead of
XGetGeometry in case the application is passing a GLXDrawable e.g.
created via glXCreateWindow which may result in a BadDrawable error with
XGetGeometry.

To be extra careful not to leak an X error from our own internal X
requests back to the application, this also adds some utilities for
trapping X errors within vogl.
Check for negative shader src len ⇒ \0 terminated
consider a 3.1 fwd compat ctx as core-profile too

Forward compatibility implies no deprecated apis and since the
deprecation model was introduced for 3.1 it seems to be equivalent to a
core-profile too.
Allow 'redundant' MakeCurrent to update drawable
Use shared wrapper for safely querying glx drawable size
glx: also try querying w/h via XGetGeometry

It turns out that there is some inconsistency between drivers over
whether it's ok to pass a vanilla X drawable to glXQueryDrawable or pass
a GLXDrawable from glXCreateWindow to XGetGeometry. glXQueryDrawable has
been also been seen to be inconsistent with mesa and an indirect context
where it may return a size of 0 with no error.

See: https://bugs.freedesktop.org/show_bug.cgi?id=54080
Support for the GL_UNSIGNED_INT_5_9_9_9_REV "type".
Use macros for 5999 constants and for pow(2,x).
Refactor voglreplay to have subcommands similar to git.
Add PLATFORM_LINUX define.
Eliminate warnings on Linux.

Interesting the warnings that came when POW2() was a macro.  Linux likes it
better as a function.
Merge pull request #71 from IanAtLunarG/pxfmt_140519_5999Rev

Support for the GL_UNSIGNED_INT_5_9_9_9_REV "type".
Fix btrace_get_current_module so it's not inlined.
Minor voglreplay cleanup.
Hide benchmark play option.
Move voglreplay options to tool files, remove unused projects.