device: allow reapply when the device is activating
Allow a reapply of the connection when the device is still activating and ensure that each reapply action is performed only at a given activation stage. For example, the IP configuration is not reactivated if the device is in the prepare stage.