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