debug: reorganize core debug checks
debug: reorganize core debug checks

move level-specific checks to their own function
factorize object-specific checks that are not related to parent/children
cleanup parent/children checks

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