agent: Fix use after free in CockpitDBusJson

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

Closes #564
Reviewed-by: Marius Vollmer <marius.vollmer@redhat.com>