[libvirt] [PATCH alternative 2/2] Change contract of virDomainGetID to make it safer