Memory overhaul
(To be merged after !20 (merged))
This fixes a number of serious memory leaks (and introduces several others, but I digress), eliminating the cmdstream_persistent
hack in favour of CSO-backed prebaked uploads, as well as implementing resource_destroy
for buffers and textures (not yet render targets).