device: restart DHCP only for devices that are active or activating
do_sleep_wake() tries to restart DHCP for all devices, even ones that are disconnecting. When a device is disconnecting, it still has a DHCP client instance but we shouldn't restart it because it makes no sense; and especially, the device could be already removed.