gmessages: Add g_warning_once()

In many places the pattern

    static gboolean warned_once = FALSE;
    if (!warned_once)
      {
        g_warning ("This and that");
        warned_once = TRUE;
      }

is used to not spam the same warning message over and over again. Add a
helper in glib for this, allowing the above statement to be changed to

    g_warning_once ("This and that");
11 jobs for wip/g-warning-once in 35 minutes and 32 seconds (queued for 1 second)
latest
Status Job ID Name Coverage
  Build
passed #384651
cross-android_api21_arm64

00:02:13

passed #384652
cross-android_api28_arm64

00:05:31

passed #384653
cross-mingw64

00:02:58

passed #384649
debian-stable-x86_64

00:11:46

passed #384662
fedora-x86_64

00:09:06

passed #384650
G_DISABLE_ASSERT

00:03:00

passed #384654
win32
msys2-mingw32

00:14:49

passed #384655
win32
vs2017-x64

00:09:16

failed #384648
fedora-x86_64

00:14:34

 
  Coverage
passed #384656
coverage

00:01:19

77.8%
 
  Analysis
passed #384657
scan-build

00:10:16