Decouple the EGL context lifetime from the EGL surface lifetime.

The EGL context is now preserved when possible. Previously we would
destroy it whenever the EGL surface was destroyed. Preserving the
EGL context preserves loaded textures and VBO resources.
1 file changed