opengles emulator: mac support binding context to pbuffer

On Mac it happens that when a context is bound to a pbuffer
and you want to bind it to a window (NSView) instead you must
release it from the pbuffer before binding the window by calling
clearDrawable handle of NSOpenGLContext.
This change added an override of NSOpenGLContext in order to track
to which drawable type the context was previously bound and
call clearDrawable when necessary.

Change-Id: Iece5ab16a46aa0d107ccb773986a6b280d09d181
2 files changed