agent: Fix use after free in CockpitDBusJson

This would occur when the CockpitDBusJson was closed while
servicing some dbus calls.