qemu: delete exist bandwidth restrictions when they are removed from config
qemu: delete exist bandwidth restrictions when they are removed from config

When the <bandwidth> of an interface is changed with update-device,
the old settings are cleared with tc, then new settings added with
tc. But if the <bandwidth has been removed, the old settings weren't
being removed, so the bandwidth restrictions would still be active on
the interface although the interface status in libvirt showed that
they had been removed.

This patch fixes it by calling virNetDevBandwidthClear() if the
"modification" to the interface bandwidth was to completely clear
it.

An alternative could have been to modify virNetDevBandwidthSet() to
always clear existing bandwith settings at the beginning of the
function (currently it short circuits in that case, doing nothing),
but that would have led to cases where virNetDevBandwidthClear() was
now being called in cases where it previously wasn't, and while many
of those cases would be NOPs, there could be cases where it would
cause an error. The way this patch works, the ...Clear() function is
only called in cases where the ...Set() function had previously been
called successfully, so the risk of regression is minimized.

  Resolves: https://bugzilla.redhat.com/1454709

andreabolognani/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,jfehlig/libvirt,jfehlig/libvirt,olafhering/libvirt,zippy2/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,jfehlig/libvirt,libvirt/libvirt,crobinso/libvirt,crobinso/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,libvirt/libvirt,andreabolognani/libvirt,nertpinx/libvirt,nertpinx/libvirt,fabianfreyer/libvirt,zippy2/libvirt,jardasgit/libvirt,eskultety/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,olafhering/libvirt,zippy2/libvirt,jardasgit/libvirt,jardasgit/libvirt,jfehlig/libvirt,eskultety/libvirt,nertpinx/libvirt,eskultety/libvirt,zippy2/libvirt,olafhering/libvirt,eskultety/libvirt,libvirt/libvirt,olafhering/libvirt,eskultety/libvirt,libvirt/libvirt,crobinso/libvirt,jardasgit/libvirt,andreabolognani/libvirt,crobinso/libvirt,jardasgit/libvirt