Wrap textures in Texture objects.

This will help if we ever want to port to Direct3D and also improves safety
because it ensures textures are cleaned up properly.

r? @metajack