ovs: wait that links disappear during initial cleanup
At startup, we remove from ovsdb any existing interface created by NM and later an interface with the same name might be readded. This can cause race conditions. Consider this series of events:
- at startup NM removes the entry from ovsdb;
- ovsdb reports success;
- NM inserts an interface with the same name again;
- ovs-vswitch monitors ovsdb changes, and gets events for removal and
insertion. Depending on how those events are split in different
batches, it might decide:
- 4a. to delete the link and add it back, or
- 4b. to keep the existing link because the delete and insertion cancel out each other.
When NM sees the link staying in platform, it doesn't know if it's because of 4b or because 4a will happen eventually.
To avoid this ambiguity, after ovsdb reports the successful deletion NM should also wait that the link disappears from platform.
Unfortunately, this means that ovsdb gets a dependency to the platform code.