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.
Perform null pointer checks of WebGL glGet*() entry points only if GL_ASSERTIONS=1. In release builds do a random thing (most likely does nothing, since writing to address 0 in the Emscripten HEAP will not crash).
Clean up GL code redundant #ifs and comment.
Merge pull request #2950 from juj/gl_edge_cases

GL edge cases.