Make --enable-dso work in the face of global bdb environment caching.
Really this time.
This adds a custom wrapper for APR's dso loading code, which loads the DSOs into a global pool that will persist long enough that we don't risk having the DSO unloaded before any cleanup functions it registered are called. Note that this only works if the new initialization function is called early enough, otherwise we are still vulnerable to the problem.
Note that I have marked the new functions as being added in 1.4.0, if we do not backport this revision to 1.4.x then this will have to be changed.
* subversion/include/svn_dso.h: New header.
* subversion/libsvn_subr/dso.c: New function, holds the DSO wrapper code.
* subversion/libsvn_ra/ra_loader.c Stop including apr_dso.h. Include svn_dso.h. (load_ra_module): Use svn_dso_load instead of apr_dso_load.
* subversion/libsvn_fs/fs-loader.c Remove include of apr_dso.h, add include of svn_dso.h. (load_module): Use svn_dso_load, not apr_dso_load.
* subversion/libsvn_subr/cmdline.c Include svn_dso.h. (svn_cmdline_init): Call svn_dso_initialize.
* subversion/mod_dav_svn/mod_dav_svn.c Include svn_dso.h. (init_dso): New hook function. (register_hooks): Register init_dso to be called as early as possible.