Add emulated glTexImage3D support.

Hopefully we'll get texImage3D in the spec soon and can just remove this.