daemon: Fix driver registration ordering
daemon: Fix driver registration ordering

There are some stateless drivers which implement subdrivers
(typically vbox and its own network and storage subdrivers). However,
as of ba5f3c7c8ecc10 the vbox driver lives in the daemon, not the
client library. This means, in order for vbox (or any stateless domain
driver) to use its subdrivers, it must register before the general
drivers. Later, when the virConnectOpen function goes through the
subdrivers, stateless drivers are searched first. If the connection
request is aiming at stateless driver, it will be opened. Otherwise
the generic subdriver is opened.

The other change done in this commit is moving interface module load a
bit earlier to match the ordering in case libvirt is built without
driver modules.

Reported-by: Taowei Luo <577c32a4e707ca46d6af0daf2f567ef9055b863e@gmail.com>
Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

jfehlig/libvirt,elmarco/libvirt,nertpinx/libvirt,zippy2/libvirt,rlaager/libvirt,jardasgit/libvirt,libvirt/libvirt,libvirt/libvirt,shugaoye/libvirt,nertpinx/libvirt,datto/libvirt,libvirt/libvirt,agx/libvirt,agx/libvirt,jardasgit/libvirt,nertpinx/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,taget/libvirt,shugaoye/libvirt,eskultety/libvirt,andreabolognani/libvirt,datto/libvirt,jfehlig/libvirt,taget/libvirt,elmarco/libvirt,crobinso/libvirt,andreabolognani/libvirt,zippy2/libvirt,agx/libvirt,eskultety/libvirt,olafhering/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,crobinso/libvirt,rlaager/libvirt,libvirt/libvirt,VenkatDatta/libvirt,andreabolognani/libvirt,eskultety/libvirt,olafhering/libvirt,andreabolognani/libvirt,rlaager/libvirt,jardasgit/libvirt,crobinso/libvirt,eskultety/libvirt,rlaager/libvirt,nertpinx/libvirt,jfehlig/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,jfehlig/libvirt,shugaoye/libvirt,eskultety/libvirt,VenkatDatta/libvirt,zippy2/libvirt,shugaoye/libvirt,shugaoye/libvirt,rlaager/libvirt,agx/libvirt,VenkatDatta/libvirt,datto/libvirt,zippy2/libvirt,fabianfreyer/libvirt,taget/libvirt,datto/libvirt,olafhering/libvirt,datto/libvirt,taget/libvirt,elmarco/libvirt,olafhering/libvirt,elmarco/libvirt,elmarco/libvirt,fabianfreyer/libvirt,taget/libvirt,agx/libvirt,fabianfreyer/libvirt,crobinso/libvirt,nertpinx/libvirt,jardasgit/libvirt