[libvirt] [PATCHv2 03/10] Refactor major.minor.micro version parsing into a function