OpenGL textures double-buffering

Dear Joker developers,

This commit implements a classic OpenGL technique to optimize an application that repeatedly uploads and draws a texture, as it is the case for the video frames for Joker.

Repeatedly uploading to a texture and displaying it can cause the CPU to wait for the GPU, slowing down the application. A classic technique to make the transfer asynchronous is to use double-buffering:
Two textures are used, the GPU draws one of them and the CPU uploads to the other one.

See 'Double Buffering Texture Data' on the following page:
https://developer.apple.com/library/mac/documentation/graphicsimaging/conceptual/opengl-macprogguide/opengl_texturedata/opengl_texturedata.html

Thanks for your attention !