Defer destruction of textures from unbound threads
Defer destruction of textures from unbound threads

This should hopefully avoid crashes seen due to image objects being destroyed
in threads other than the Renderer-bound one. Now those objects are put on a
list and destroyed at the next ->flush() call (at least once per frame).

Other Renderer APIs still must be called only from the thread the GL context
is bound!

steveschnepp/OpenApoc,Istrebitel/OpenApoc,pmprog/OpenApoc,steveschnepp/OpenApoc,Istrebitel/OpenApoc,pmprog/OpenApoc