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