[libvirt] [PATCH v3 2/4] Move capability formatting together