egl: Call loseCurrent after eglReleaseThread

Call the device specific eglReleaseThread before the the device
independent egl_display_t::loseCurrent.  loseCurrent will reset
the surface format in the destructor.  The device specific code
needs an opportunity to finish things up before surface state is
changed.

Change-Id: Icfc79eba440a6c03bd68aacc087402a8c785dd4a