Implemented some performance counters for F11 display.
Implemented caching of currently set texture.
Added function to flush the GPU command buffer.

Currently unused; only for debugging stutter.