device: check platform link compatibility when setting nm-owned flag
We set nm-owned to indicate whether a software device was created by NM or it was pre-existing. When checking the existence, we must verify also whether the link type is compatible with the device, otherwise it is possible to match unrelated interfaces. For example, when checking for the existence of an ovs-bridge (which is not compatible with any platform link) we could match a unrelated platform link with the same name.