build: Add cleanup functions

Since it's just using this one header from libgsystem for now, just copy the
header file instead of using a git submodule.

(cherry picked from commit e9cab814892fc5b697e7574a827ac4d5e16f2b3b)
all: Do not use '&s' format with g_variant_get

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=708198 and
https://bugzilla.redhat.com/show_bug.cgi?id=1036374 .