Revert "Revert "[gtk] Cherry-pick commit from gtk+ master to fix NULL pointer in gtk_clipboard_wait_for_contents.""

This reverts commit 1fe6cf599e4185f1264f70160e65a2265e803d96.

The previous revert was unnecessary.