src/driver.c: remove duplicated code in virGetConnect* functions
src/driver.c: remove duplicated code in virGetConnect* functions

All the 6 virGetConnect* functions in driver.c shares the
same code base. This patch creates a new static function
virGetConnectGeneric() that contains the common code to
be used with all other virGetConnect*.

Reviewed-by: Cole Robinson <7cd45ff6ad1fb7cf556a02797d774247851499f8@redhat.com>
Signed-off-by: Daniel Henrique Barboza <627b089ad62deae9aaf06ccfa2c9056df28927e0@gmail.com>

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