Prevent division by zero.
Exposed Texture2D::Load() to Lua. Added Detach() function to SharedPtr which will safely detach the pointer without destroying the object. To only be used in scripting integration. Fixed loading of texture with compressed data first and then uncompressed.