network: fix editing connections without a device
For example, fix adding new VPN connections.
In 60b4956c I correctly observed that we need to not run code that requires a device when there is no device. NetConnectionEditor is a multipurpose dialog and self->device is optional when creating the dialog. E.g. when modifying VPN configuration, we update just the configuration, not an NMDevice.
However, I added this check too soon, before updating the connection configuration. We need to update the configuration first, then only bail before proceeding to update the device, not sooner.
Fix #2668 (closed)