networkmanager: Don't change settings structure in place
networkmanager: Don't change settings structure in place

Instead, make a copy and change that.  This matters when making
changes that break connectivity.

Previously, we would freeze the connection, make changes according to
the dialog, apply the new settings, and unfreeze the connection.  If
this is wrapped in a checkpoint, the rollback happens after the
unfreeze and the our connection object picks up the current values
again, thus losing the user edits.  However, we might need those edits
when the user clicks the "Make these changes anyway" button.

It is simpler to just copy the settings and change the copy according
to the dialog.  We keep that copy around until it's all said and done.

Closes #5069
Reviewed-by: Dominik Perpeet <f7830b2723a5db4fc185058b06cfab4b89a38da9@redhat.com>

garrett/cockpit,moraleslazaro/cockpit,Scribery/cockpit,michalskrivanek/cockpit,mvollmer/cockpit,larsu/cockpit,sgallagher/cockpit,cockpit-project/cockpit,petervo/cockpit,cockpituous/cockpit,moraleslazaro/cockpit,michalskrivanek/cockpit,harishanand95/cockpit,deryni/cockpit,michalskrivanek/cockpit,dperpeet/cockpit,stefwalter/cockpit,mareklibra/cockpit,Scribery/cockpit,arilivigni/cockpit,harishanand95/cockpit,dperpeet/cockpit,cockpit-project/cockpit,petervo/cockpit,vanloswang/cockpit,michalskrivanek/cockpit,deryni/cockpit,andreasn/cockpit,stefwalter/cockpit,petervo/cockpit,larsu/cockpit,xhad/cockpit,arilivigni/cockpit,larskarlitski/cockpit,cockpituous/cockpit,stefwalter/cockpit,stefwalter/cockpit,SotolitoLabs/cockpit,mareklibra/cockpit,deryni/cockpit,xhad/cockpit,mareklibra/cockpit,garrett/cockpit,xhad/cockpit,arilivigni/cockpit,SotolitoLabs/cockpit,andreasn/cockpit,arilivigni/cockpit,larsu/cockpit,larskarlitski/cockpit,larsu/cockpit,SotolitoLabs/cockpit,martinpitt/cockpit,SotolitoLabs/cockpit,mareklibra/cockpit,sgallagher/cockpit,larskarlitski/cockpit,deryni/cockpit,sgallagher/cockpit,larskarlitski/cockpit,cockpituous/cockpit,vanloswang/cockpit,vanloswang/cockpit,mvollmer/cockpit,harishanand95/cockpit,andreasn/cockpit,vanloswang/cockpit,dperpeet/cockpit,SotolitoLabs/cockpit,larskarlitski/cockpit,xhad/cockpit,cockpituous/cockpit,sgallagher/cockpit,michalskrivanek/cockpit,xhad/cockpit,stefwalter/cockpit,martinpitt/cockpit,vanloswang/cockpit,Scribery/cockpit,martinpitt/cockpit,petervo/cockpit,harishanand95/cockpit,sgallagher/cockpit,xhad/cockpit,Scribery/cockpit,mareklibra/cockpit,michalskrivanek/cockpit,mvollmer/cockpit,garrett/cockpit,moraleslazaro/cockpit,stefwalter/cockpit,cockpit-project/cockpit,larsu/cockpit,moraleslazaro/cockpit,martinpitt/cockpit,deryni/cockpit,dperpeet/cockpit,deryni/cockpit,moraleslazaro/cockpit,SotolitoLabs/cockpit,sgallagher/cockpit,petervo/cockpit,mvollmer/cockpit,Scribery/cockpit,vanloswang/cockpit,andreasn/cockpit,arilivigni/cockpit,moraleslazaro/cockpit,garrett/cockpit,sgallagher/cockpit,andreasn/cockpit,mareklibra/cockpit,petervo/cockpit,larskarlitski/cockpit,harishanand95/cockpit,dperpeet/cockpit,Scribery/cockpit,martinpitt/cockpit,petervo/cockpit,mareklibra/cockpit,dperpeet/cockpit,michalskrivanek/cockpit,arilivigni/cockpit,arilivigni/cockpit,larsu/cockpit,moraleslazaro/cockpit,cockpit-project/cockpit,andreasn/cockpit,SotolitoLabs/cockpit,harishanand95/cockpit,cockpit-project/cockpit,vanloswang/cockpit,larskarlitski/cockpit,dperpeet/cockpit,deryni/cockpit,mvollmer/cockpit,garrett/cockpit,cockpituous/cockpit,harishanand95/cockpit,stefwalter/cockpit,Scribery/cockpit,andreasn/cockpit,xhad/cockpit,cockpituous/cockpit