Failed attempt to render Rift mode to offscreen buffer, then restore to screen.
Merge branch 'oculus-rift' of https://github.com/cmbruns/Doomsday-Engine into oculus-rift
libgui|GLState: Allow fluently applying a popped state
Cleanup|ClientWindow: Moved wip Oculus Rift drawing to a private method

Also, fixed some issues with the use of GLState:

- This test code is using immediate GL drawing, which means every
  change to GLState has to be manually applied before drawing.
  Managed drawing with libgui's Drawable will do this for us.

- Applied a purple hue to identify that the graphics are coming
  from the offscreen target.

- Clearing the targets appropriately before drawing.

- For the final draw, disable blending and depth test.

Todo: Next problem is to find out why the game-side menu drawer
messes up GL state in such a way that the screen is drawn as purple.
Fixed|ClientWindow|Stereo 3D: Compensate for legacy graphics code

The legacy graphics code is still completely bypassing libgui's GL
state management so we have to hack around it.

The main problem was that GL_TEXTURE_2D was left disabled after the
legacy renderer had drawn the frame.

Todo: There is still a funky issue with the depth buffer.
Add depth/stencil buffer to GLTarget with texture color attachment.
Restore global variable for VR::mode
Hacked in a simple shader
Warp shader is working.
Turn off frustum shift in Rift mode.
libgui|Refactor|GLTarget: Extra attachments in addition to texture

Rewrote and cleaned up some of the implementation of GLTarget to
account for the fact that one may need supporting attachments in
addition to a texture.

Thanks to cmbruns for pointing this out.
Fixed|Client: Crash due to accessing OpenGL from non-UI thread

During busy mode, if the value of 'rend-vr-mode' was updated due to
restoring a saved config, it meant that the root widget was resized
from a non-UI thread.

Now the resizing is deferred to the beginning of the next frame.
Refactor|Client|Map Renderer: Dismantled more of obsolete/old "rendpoly" stuff
libgui: Added Vertex3Tex format, handle #version in GLShader
Stereo 3D|Client|Refactor: Use libgui to draw Oculus Rift frames

The Oculus Rift barrel distortion was moved to shaders.dei and
adapted to use GLBuffer.

Created a static vertex buffer for the simple quad used for drawing
the distorted screen.
Merge branch 'master' of ssh://github.com/skyjake/Doomsday-Engine into oculus-rift
Merge branch 'oculus-rift' into low-latency-input