Remove the quad primitive type

It's not supported by OpenGL ES 2.0
Make quads available for rendering with

While we won't use them internally, custom shapes from users may
be drawn with quads.
Properly terminate the attribute list
Remove an unnecessary item from the attribute list
Update comment on possible Android bug
Add missing check to EGL call
Add braces to an if statement to fix macro problems

eglCheck is a macro that expands to two individual statements (in
debug mode). Without braces, the macro expansion results in the
second statement always being executed, even when the if statement
evaluates to false.
Reset the EGL surface after destruction

That way the surface can be checked if it's still valid or not.
Check if the surface is valid instead of the context for makeCurrent()

The surface will only be valid if the context is valid, however in
some situations the context may be valid while the surface is not.
Checking the surface for validity is a stricter requirement and
avoids erronous calls to eglMakeCurrent().