test: Fix race condition in selenium-tuned.py
test: Fix race condition in selenium-tuned.py

Wait for the modal dialog to appear and disappear (using the previously
introduced `wait_not` API), to avoid the rather imprecise subsequent
string matches to happen in the dialog instead of the main page.

Wait until Cockpit shows the newly selected performance profile, instead
of expecting that the change happens synchronously after clicking the
dialog button.

Avoid the page refresh by setting up tuned before logging in.

deryni/cockpit,moraleslazaro/cockpit,cockpituous/cockpit,mvollmer/cockpit,mvollmer/cockpit,cockpituous/cockpit,cockpituous/cockpit,martinpitt/cockpit,cockpit-project/cockpit,mvollmer/cockpit,deryni/cockpit,garrett/cockpit,moraleslazaro/cockpit,deryni/cockpit,mvollmer/cockpit,deryni/cockpit,garrett/cockpit,cockpituous/cockpit,deryni/cockpit,deryni/cockpit,moraleslazaro/cockpit,martinpitt/cockpit,garrett/cockpit,moraleslazaro/cockpit,martinpitt/cockpit,cockpit-project/cockpit,moraleslazaro/cockpit,moraleslazaro/cockpit,garrett/cockpit,cockpit-project/cockpit,cockpituous/cockpit,cockpit-project/cockpit,cockpituous/cockpit,mvollmer/cockpit,garrett/cockpit,deryni/cockpit,martinpitt/cockpit,moraleslazaro/cockpit,martinpitt/cockpit,cockpit-project/cockpit