Allow building with pre-4.6 GCC
Avoid use of setenv

bash exports setenv and getenv; when primus' initialization is triggered in
bash before main(), a call to setenv will initialize internal environment var
table and subsequent calls to getenv will return NULL.
Report failure to open primary dpy
Improve error reporting for broken ddpy GLX
Add memory ordering between todo marker and dimensions (GH-97)
Basic support for handling GLX extensions
Add GLX_ARB_create_context (GH-106; fixes GH-36)
Use caller-supplied dpy in glXCreateWindow (fixes GH-111)
Use caller-supplied dpy in glXCreate*
Flush the application X connection in glXSwapBuffers

Otherwise there may be no other activity on the connection and application
requests such as resize may be never flushed out.  Fixes CoherentUI
Factor out Profiler::get_timestamp
Remove Profiler::nstates
Report sizes in perf output
Allow glXQueryDrawable on unknown windows (fixes GH-121)
Avoid recreating pbuffers when size doesn't change (GH-120)
Switch back to GL_TEXTURE_2D to enable i965 fast upload
Use GL_UNSIGNED_BYTE instead of GL_UNSIGNED_INT_8_8_8_8_REV

Together with the previous commit, this allows glTexSubImage to hit fast
texture upload path in i965 driver in Mesa 10.0 and 9.1 (not 9.2, which
switched to Y-tiled textures, but fast upload was not ready for that).
Correct condition for restarting workers on context change
Warn if drawable is not current to glXSwapBuffers thread
Implement PBO glDrawPixels upload/display path

Should be more efficient on i965 with Mesa-10.1+