Various fixes and support for compressedTexImage2D.