This allows connecting a GDestroyNotify for when the callback is removed/replaced. Partially fixes #514717