Clear the hook before adding it so that we are sure the removed
callback doesn't contain garbage and cause a crash on disconnect.
Mark the removed and priv fields as private. Make sure to add the
removed callback after adding the hook.
Fixes a crash in kwin
Make sure the hook lists are emptied so that the removed callbacks
are called. The callers should really remove the hook they installed
themselves but this is a last chance to fix things up.
This tests exporting a PW_TYPE_INTERFACE_Endpoint and binding
a proxy for it through the registry, verifying that info and params
are propagated properly from one to the other