Thin3d - the thinnest wrapper around D3D9 and GL around

Add Thin3d, slip it underneath all our UI drawing code so that it can now run on either OpenGL or Direct3D.

Incomplete, does not handle scissor rects 100% (doesn't account for the y flip) etc. Suboptimal shader uniform handling. But kinda works.
I notice this is only checked for subdata, should it check for setdata too?  Or is an error only possible with a > 0 offset?

I guess if it doesn't set the data, it should probably log?

-[Unknown]