Added tests for invalid parameters and terminators, to test functionality of egl context creation. This also adds a RED clear color for the default viewport so that the GL output can be visually observed
Fix for incorrect parsing of context attributes as in emscripten issue #2518
Clean up code from prabindh's pull request.