Do more complete initialization of libgcrypt
Do more complete initialization of libgcrypt

If libvirt makes any gcry_control() calls, then this
prevents gnutls for doing any initialization. As such
we must take care to do full initialization of libcrypt
on a par with what gnutls would have done. In particular
we must disable "sec mem" for cases where the user does
not have mlock() permission. We also skip our init of
libgcrypt if something else (ie the app using libvirt)
has beaten us to it.

https://bugzilla.redhat.com/show_bug.cgi?id=951630

Signed-off-by: Daniel P. Berrange <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

nertpinx/libvirt,nertpinx/libvirt,elmarco/libvirt,datto/libvirt,fabianfreyer/libvirt,cbosdo/libvirt,libvirt/libvirt,shugaoye/libvirt,fabianfreyer/libvirt,agx/libvirt,jardasgit/libvirt,shugaoye/libvirt,olafhering/libvirt,crobinso/libvirt,VenkatDatta/libvirt,datto/libvirt,eskultety/libvirt,rlaager/libvirt,datto/libvirt,rlaager/libvirt,zhlcindy/libvirt-1.1.4-maintain,jardasgit/libvirt,olafhering/libvirt,andreabolognani/libvirt,taget/libvirt,jardasgit/libvirt,cbosdo/libvirt,jfehlig/libvirt,agx/libvirt,jfehlig/libvirt,rlaager/libvirt,eskultety/libvirt,VenkatDatta/libvirt,zippy2/libvirt,jardasgit/libvirt,rlaager/libvirt,fabianfreyer/libvirt,elmarco/libvirt,zippy2/libvirt,zippy2/libvirt,zhlcindy/libvirt-1.1.4-maintain,zhlcindy/libvirt-1.1.4-maintain,shugaoye/libvirt,zhlcindy/libvirt-1.1.4-maintain,cbosdo/libvirt,shugaoye/libvirt,taget/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,cbosdo/libvirt,shugaoye/libvirt,crobinso/libvirt,datto/libvirt,crobinso/libvirt,andreabolognani/libvirt,agx/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,zhlcindy/libvirt-1.1.4-maintain,jfehlig/libvirt,elmarco/libvirt,libvirt/libvirt,VenkatDatta/libvirt,agx/libvirt,nertpinx/libvirt,olafhering/libvirt,datto/libvirt,libvirt/libvirt,crobinso/libvirt,jardasgit/libvirt,taget/libvirt,zippy2/libvirt,andreabolognani/libvirt,jfehlig/libvirt,taget/libvirt,elmarco/libvirt,eskultety/libvirt,eskultety/libvirt,rlaager/libvirt,libvirt/libvirt,eskultety/libvirt,olafhering/libvirt,andreabolognani/libvirt,agx/libvirt,nertpinx/libvirt,cbosdo/libvirt,nertpinx/libvirt,taget/libvirt,elmarco/libvirt