Make the default framebuffer owned by Surface

In CGL there is no notion of default Framebuffer and MakeCurrent only
makes a context current but not a drawable. Instead, everything is done
via render to texture. For that reason, different surfaces will have
different FBOs as default framebuffers, which causes that change.

BUG=angleproject:891

Change-Id: I3f6da7b587353316026ea39a5c87f91265e0f1ba
Reviewed-on: https://chromium-review.googlesource.com/289872
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/libANGLE/renderer/DisplayImpl.cpp b/src/libANGLE/renderer/DisplayImpl.cpp
index 16446f9..2eb44eb 100644
--- a/src/libANGLE/renderer/DisplayImpl.cpp
+++ b/src/libANGLE/renderer/DisplayImpl.cpp
@@ -29,8 +29,8 @@
 
 void DisplayImpl::destroySurface(egl::Surface *surface)
 {
-    surface->onDestroy();
     mSurfaceSet.erase(surface);
+    surface->onDestroy();
 }
 
 const egl::DisplayExtensions &DisplayImpl::getExtensions() const