Fix a nasty bug where ignore-keep-structure messes up the root object
Fix a nasty bug where ignore-keep-structure messes up the root object

If we ever remove the root object, we need to mark the replacing object as root
(its parent=NULL and depth=0 must be hardwired, they are not updated when building levels)

Not sure this bug would happen in trunk, but it will happen in the components branch
(when multiple backends need reconnects before they can discover).

As stated in comments in this code, we should have a preference order
(based on types) to choose between removing the root object or the child.
That's TODO for later.

git-svn-id: 14be032f8f42541b1a281b51ae8ea69814daf20e@4946 4b44e086-7f34-40ce-a3bd-00e031736276

BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc,BlueBrain/hwloc