Disallow invalid clears in WebGL 2

This improves cross-platform compatibility and testability of the API by
eliminating undefined behavior.

Another option would be to define the conversions performed when the
types mismatch, but this would increase WebGL/GLES3 incompatibility
compared to this option.