Add texture_delete() function.
Explicitly delete old texture when resizing a widget, instead of waiting for texture garbage collection to free it (which may take some time).
Delete inventory texture when resizing the inventory.