Text, Texture: Call glDeleteTextures() when destroyed
Fix some errors and leaks detected by valgrind