GL edge cases.

Fix null pointer reads and writes in glGetUniformIndices(). Fix cases where GL layer might throw a JS exception if a GL call fails. Fix null pointer writes if zero is passed as an out pointer in multiple glGet*() calls. @kripken: Could you give this a brief look?
How about putting the entire checks behind `GL_ASSERTIONS`? It would be nice to not run any check at all in fully optimized builds, these checks are really just for debugging purposes.