local-alloc: Define cleanup functions for GKeyFile and GList

See https://github.com/hughsie/libhif/pull/2