[PATCH 1/5] wined3d: Discard texture resources before unloading them in wined3d_texture_destroy_object().