quartz: Add missing g_object_ref

A g_object_ref() call was missing, sometimes causing crashes during
drag-and-drop operations. The matching g_object_unref() is at
gdk/gdkdnd.c:261.

The logic in this function is still wrong--it finds the wrong GdkWindow under
some circumstances--but this commit fixes the crash.

Part of #1840.
4 jobs for fix-dnd-macos in 18 minutes and 54 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Build
passed #279245
fedora-autotools

00:10:19

passed #279246
fedora-meson

00:07:47

manual #279248
win32 allowed to fail manual
msys2-mingw32-autotools
passed #279247
win32
msys2-mingw32-meson

00:18:54