The panel owns both the GtkDialog, and the GoaProvider that is used
with the dialog during goa_provider_add_account. When the panel is
destroyed, it drops its references to the provider but not the dialog,
which is a separate top-level widget. Therefore, if the panel is
switched while the WebKitWebView inside the dialog was still
navigating across pages, then WebKitWebView::decide-policy will be
called with an invalid provider.
To avoid this, and a memory leak, the panel should also destroy the
dialog when it is itself getting destructed.
Note that since the GtkDialog is a template child, it must be
destroyed in dispose. GtkWidget's (ie. the panel's) default default
destroy signal handler NULLifies all template children pointers, so
finalize is too late.
https://bugzilla.gnome.org/show_bug.cgi?id=782043