udevtrigger: add device_has_attribute helper