dev_change_netns allows to move a device given by name to a network namespace given by netns_fd
and optionally change the device name.
The device name will be kept the same if device.Name is None or an empty string.
This function ensures that the move and rename operations occur atomically.
It preserves existing interface attributes, including IP addresses.