vboxDumpNetworks: do not allocate def->nets upfront
vboxDumpNetworks: do not allocate def->nets upfront

Use VIR_APPEND_ELEMENT instead and change the return type
to int to catch allocation errors.

This removes the need to figure out the adapter count
upfront.

Signed-off-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

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