edbus: simplify and fix ObjectManager?
Give the object that originated the signal to use in the idler for changes in ther interfaces. This greatly simplifies the code, particularly while removing.
Fix some issues in the previous implementations. There are some races and corner cases that need to be taken into account in ObjectManager?:
- Adding and removing an interface in the same mainloop iteration. We were previously sending only the signal InterfacesRemoved?
- When we dettach an object manager we need to flush its signals
- Since now we store the iface_{added,removed} in the object in which they happen we also need to flush out signals when attaching an ObjectManager?, but let the previous ObjectManager? send the signals
- When we free an Object also flush the changes. Previously we were omitting the signal.
There are still some places to fix and some improvements to be made. I let some TODOs and FIXMEs there.