[libvirt] [PATCH 10/16] Refactor migration completion loop to allow code reuse