linux: fix topology

Find the parent dev by removing the last number after the . or -
(and prepending with usb if only one number is left) and comparing
it against the sysfs_dir or previously scanned devices. To make this
work in the netlink case scan for root hubs first. The udev case
needs no special handling.