Cleanup input args when marshaling in closures

The cleanup must happen before setting the out args otherwise
the args that cleanup would free are the just set args, not the
original ones.

https://bugzilla.gnome.org/show_bug.cgi?id=727004