core: abstract out reorder_children(), needed when merging modifies the list of children
core: abstract out reorder_children(), needed when merging modifies the list of children

shekkbuilder/hwloc,shekkbuilder/hwloc,shekkbuilder/hwloc,shekkbuilder/hwloc