Fix initialization order bugs
Fix initialization order bugs

virInitialize must be the first libvirt function called to ensure
threads, error handling & random number generator are all setup.

Move UNIX socket directory permissions change to place of use

leilihh/libvirt,amery/libvirt-vserver,sshah-solarflare/Libvirt-PCI-passthrough-,novel/fbsd-libvirt,shugaoye/libvirt,siboulet/libvirt-openvz,andreabolognani/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,emaste/libvirt,eskultety/libvirt,trainstack/libvirt,shugaoye/libvirt,eskultety/libvirt,siboulet/libvirt-openvz,amery/libvirt-vserver,soulxu/libvirt-xuhj,shugaoye/libvirt,trainstack/libvirt,elmarco/libvirt,rlaager/libvirt,jeckersb/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,jfehlig/libvirt,bjzhang/libvirt,dumbbell/libvirt,usc-isi/libvirt,nertpinx/libvirt,danwent/libvirt-ovs,VenkatDatta/libvirt,nertpinx/libvirt,iam-TJ/libvirt,foomango/libvirt,agx/libvirt,crobinso/libvirt,rmarwaha/libvirt,eskultety/libvirt,emaste/libvirt,trainstack/libvirt,datto/libvirt,amery/libvirt-vserver,nertpinx/libvirt,andreabolognani/libvirt,jfehlig/libvirt,iam-TJ/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,jeckersb/libvirt,elmarco/libvirt,soulxu/libvirt-xuhj,cbosdo/libvirt,novel/fbsd-libvirt,libvirt/libvirt,crobinso/libvirt,nertpinx/libvirt,kantai/libvirt-vfork,taget/libvirt,libvirt/libvirt,bjzhang/libvirt,rbu/libvirt,rmarwaha/libvirt1,olafhering/libvirt,bjzhang/libvirt,jardasgit/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,rmarwaha/libvirt1,fabianfreyer/libvirt,rmarwaha/libvirt,VenkatDatta/libvirt,usc-isi/libvirt,zhlcindy/libvirt-1.1.4-maintain,rmarwaha/libvirt1,VenkatDatta/libvirt,wiedi/libvirt,leilihh/libvirt,leilihh/libvirt,eskultety/libvirt,nertpinx/libvirt,warewolf/libvirt,eskultety/libvirt,fabianfreyer/libvirt,emaste/libvirt,novel/fbsd-libvirt,novel/fbsd-libvirt,rbu/libvirt,fabianfreyer/libvirt,wiedi/libvirt,rmarwaha/libvirt1,soulxu/libvirt-xuhj,zippy2/libvirt,cbosdo/libvirt,taget/libvirt,datto/libvirt,VenkatDatta/libvirt,emaste/libvirt,soulxu/libvirt-xuhj,kantai/libvirt-vfork,danwent/libvirt-ovs,rbu/libvirt,iam-TJ/libvirt,rbu/libvirt,dumbbell/libvirt,crobinso/libvirt,rlaager/libvirt,warewolf/libvirt,novel/fbsd-libvirt,zhlcindy/libvirt-1.1.4-maintain,warewolf/libvirt,rmarwaha/libvirt1,libvirt/libvirt,libvirt/libvirt,wiedi/libvirt,emaste/libvirt,zippy2/libvirt,warewolf/libvirt,VenkatDatta/libvirt,jeckersb/libvirt,amery/libvirt-vserver,kantai/libvirt-vfork,leilihh/libvirt,taget/libvirt,agx/libvirt,rmarwaha/libvirt,emaste/libvirt,wiedi/libvirt,trainstack/libvirt,kantai/libvirt-vfork,elmarco/libvirt,andreabolognani/libvirt,novel/fbsd-libvirt,agx/libvirt,zhlcindy/libvirt-1.1.4-maintain,zippy2/libvirt,fabianfreyer/libvirt,warewolf/libvirt,jardasgit/libvirt,jardasgit/libvirt,shugaoye/libvirt,taget/libvirt,wiedi/libvirt,danwent/libvirt-ovs,bjzhang/libvirt,elmarco/libvirt,siboulet/libvirt-openvz,iam-TJ/libvirt,novel/fbsd-libvirt,elmarco/libvirt,shugaoye/libvirt,datto/libvirt,soulxu/libvirt-xuhj,wiedi/libvirt,jeckersb/libvirt,iam-TJ/libvirt,fabianfreyer/libvirt,siboulet/libvirt-openvz,agx/libvirt,rlaager/libvirt,usc-isi/libvirt,kantai/libvirt-vfork,trainstack/libvirt,olafhering/libvirt,jeckersb/libvirt,cbosdo/libvirt,rmarwaha/libvirt,zhlcindy/libvirt-1.1.4-maintain,jfehlig/libvirt,sshah-solarflare/Libvirt-PCI-passthrough-,usc-isi/libvirt,dumbbell/libvirt,taget/libvirt,leilihh/libvirt,novel/fbsd-libvirt,danwent/libvirt-ovs,trainstack/libvirt,olafhering/libvirt,crobinso/libvirt,andreabolognani/libvirt,cbosdo/libvirt,foomango/libvirt,rmarwaha/libvirt,foomango/libvirt,dumbbell/libvirt,andreabolognani/libvirt,jfehlig/libvirt,leilihh/libvirt,jeckersb/libvirt,dumbbell/libvirt,rlaager/libvirt,rmarwaha/libvirt,cbosdo/libvirt,jeckersb/libvirt,warewolf/libvirt,rmarwaha/libvirt1,zippy2/libvirt,iam-TJ/libvirt,rlaager/libvirt,usc-isi/libvirt,amery/libvirt-vserver,iam-TJ/libvirt,rbu/libvirt,foomango/libvirt,trainstack/libvirt,siboulet/libvirt-openvz,bjzhang/libvirt,emaste/libvirt,jardasgit/libvirt,foomango/libvirt,danwent/libvirt-ovs,novel/fbsd-libvirt,wiedi/libvirt,datto/libvirt,warewolf/libvirt,agx/libvirt,dumbbell/libvirt,olafhering/libvirt,datto/libvirt