egl: Make surfaces and contexts resources.

Turn _EGLSurface and _EGLContext into _EGLResource so that they can be
managed uniformly.
9 files changed