webgl: Implement the pending texImage2D overload, and add more valida…
87e112d
…tion This is a large-ish refactor of the Texture2D code, but it should be easier to read and of course more correct. I tried to annotate every error condition with a spec paragraph.