discover: Update udev routines to use libudev