opengles emulator: fixed EGLContext and EGLSurface ref-counting.

Handle EGL context and surfaces destrouction using ref counting
pointer (SmartPtr) rather then maintaining a "markForDeletion" flag.
This has required to re-arrange the ThreadInfo structure to be local
to EGL rather then in the GLcommon area so that we will be able to
place a ref-counted pointer to the current context in the TLS.

That fixes the crash during exit of covgl conformance test.

Change-Id: I6f0a2e49c6f21eb75b654cab4346c764715c449b
17 files changed