machines: when changing the disk's access mode do it in a deterministic way
machines: when changing the disk's access mode do it in a deterministic way

The onchange event occurs when the checked state has been changed, which
will happen for one of the radio buttons controlling the access mode.
The way this was implemented earlier was causing the dialog to have a
weird behavior on tests. Let's make one state update per event which
hopefully will robustify the testDiskEdit.

Closes #14955
cockpit-project/cockpit,cockpit-project/cockpit,martinpitt/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,deryni/cockpit,mvollmer/cockpit,deryni/cockpit,deryni/cockpit,cockpit-project/cockpit,garrett/cockpit,deryni/cockpit,martinpitt/cockpit,deryni/cockpit,garrett/cockpit,mvollmer/cockpit,deryni/cockpit,mvollmer/cockpit,garrett/cockpit,deryni/cockpit,garrett/cockpit,martinpitt/cockpit,martinpitt/cockpit,martinpitt/cockpit,mvollmer/cockpit,garrett/cockpit,mvollmer/cockpit