endpoint: steal the endpoint link from the list before destroying it
The wp_endpoint_link_destroy API removes the link from both endpoints. If this is called in the endpoint destructor, we need to make sure the link is not in the endpoint link list (by stealing it) to prevent the API destroying it again.