D3D speedups

This PR picks 4 commits of galop1n's D3D branch which are simple d3d backend changes.
Coding style and undescriptive variable. I guess this should be `indices_size` or something like that.