[PATCH 4/9] qemuSnapshotForEachQcow2: Refactor