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