test: Re-fix image-prepare with --overlay
test: Re-fix image-prepare with --overlay

Commit 779d7f08936ba caused three regressions:

 * Crash with `UnboundLocalError: local variable 'qcow2_image' referenced before assignment`
   with `--overlay`, if the target image was already existing (as it
   happens with preparing the `dnf-copr` scenario). In that case
   prepare_install_image() does not create any new overlay, so return
   None instead.

 * Crash due to the target symlinking already existing with `--overlay`,
   as the previous os.unlink() was not moved along with the os.symlink()
   move.

 * `VirtMachine` needs to be called on the .qcow2 overlay file
   instead of the target symlink, as the latter does not exist yet
   without `--overlay`.

Factorize the logic into a new finalize_image().

Also rename the return vaules of prepare_install_image() to something
more descriptive.

martinpitt/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,martinpitt/cockpit,mvollmer/cockpit,cockpit-project/cockpit,mvollmer/cockpit,mvollmer/cockpit,martinpitt/cockpit,cockpit-project/cockpit,mvollmer/cockpit,mvollmer/cockpit,martinpitt/cockpit,martinpitt/cockpit