[libvirt] [PATCHv3 1/2] util: refactor virFileOpenAs