FolksTestDBus: flush and close connection before disposing of it
FolksTestDBus: flush and close connection before disposing of it

g_dbus_connection_dispose() sets connection->worker = NULL, which
means any attempt to send a message will crash with a segfault.
If anything still has a ref to the connection - in Folks, that's
often a backend reffed by the IndividualAggregator - then it'll
tend to assume that it's still usable.

Attempts to send messages are guarded by a check whether the
connection is closed, which we can use to avoid this.

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

pwithnall/folks,GNOME/folks,GNOME/folks,GNOME/folks,pwithnall/folks,pwithnall/folks