glib-genmarshal: Avoid a string copy for static string valist arguments

When building a valist marshaller, we can avoid a string copy if the
argument is known to always be static. The marshaller we ship in
`gmarshal.c` got this right, but marshallers generated by
glib-genmarshal were missing the optimisation. Fix that.

Backported version of !904 does not include the unit test. The version
of this on `master` includes a unit test.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Fixes: #1792
8 jobs for backport-904-genmarshal-fixes-glib-2-60 in 26 minutes and 2 seconds (queued for 1 second)
Status Job ID Name Coverage
  Build
passed #321452
cross-android_api21_arm64

00:05:42

passed #321453
cross-android_api28_arm64

00:05:35

passed #321454
cross-mingw64

00:05:46

passed #321585
fedora-x86_64

00:05:32

passed #321455
win32
msys2-mingw32

00:12:40

passed #321456
win32
vs2017-x64

00:09:01

failed #321451
fedora-x86_64

00:07:07

 
  Coverage
passed #321457
coverage

00:02:36

77.5%