Fix incorrect skipping in contextAttribs parsing in eglCreateContext (library_egl.js)

Fix incorrect skipping of contextAttribs array in eglCreateContext. Otherwise the loop runs twice instead of once, and value will get incorrectly assigned to param, causing glesContextVersion check in eglCreateContext to fail, and return 0x3005.
Nice catch. However, we should then treat `0` as an undefined attribute and do `if (!param) { EGL.setErrorCode(0x3004 /* EGL_BAD_ATTRIBUTE */); return 0; }` in addition, since not acknowledging incorrectly null-terminated arrays will be error-prone and the spec says "An EGL_BAD_ATTRIBUTE error is generated if attrib_list contains an undefined EGL attribute or an attribute value that is unrecognized or out of range."

Also, can you squash/rebase your pull request so that it only contains the relevant changes and not the previous temp commits?