Fix texture atlases in IE11.

Also moved most of the functionality that was in `Context.createTexture2D` to the newly-refactored `Texture` constructor.