OpenGL: fix spurious EGLSync on queue destruction.

During Device::Destroy(), Queue::WaitForIdleForDestruction() is
called. In the GL backend, this calls gl.Finish(). But the
"GetGL()" call used to call gl.Finish() causes mHasPendingCommands
to be set to true.

Later in Device::Destroy(), TickImpl() is called one last time
to release resources. In the GL case, since mHasPendingCommands
is true, this inserts a new EGLSync which is never destroyed or
waited on.

The fix is to set mHasPendingCommands to false after gl.Finish().
Leaving no pending commands is the very definition of glFinish(),
so it's safe to do.

Bug: 340202279
Change-Id: I3625363018b564fd4409c957576ab9dfe5917d7f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/188061
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/src/dawn/native/opengl/QueueGL.cpp b/src/dawn/native/opengl/QueueGL.cpp
index 70458ac..a2e1698 100644
--- a/src/dawn/native/opengl/QueueGL.cpp
+++ b/src/dawn/native/opengl/QueueGL.cpp
@@ -258,6 +258,7 @@
     gl.Finish();
     DAWN_TRY(CheckPassedSerials());
     DAWN_ASSERT(mFencesInFlight->empty());
+    mHasPendingCommands = false;
     return {};
 }