[libvirt PATCH 1/3] util: introduce virBufferTrimLen