Convert hwloc internals into our own representation.