Improved the extending API

Removed BaseTexture, since a new texture type is now just a constructor
- there is nothing to extend.

Added error reporting handlers, and added the needed
WebGLRenderingContext reference as one of the arguments of a texture.

More cleaning.