Return compare function from impl_provider#get_implementations

This avoids hacking around with watched interfaces.