log: don't call dlopen inside dl_iterate_phdr()
log: don't call dlopen inside dl_iterate_phdr()

Some platforms (eg. FreeBSD 10+) don't support calling dlopen() from
within a dl_iterate_phdr() callback; so save all of the dlpi_names to
a list and iterate over them afterwards.

This fixes a deadlock which occurs in dlopen() when called from
within dl_iterate_phdr() on FreeBSD 10+ when linked to libthr.

Patch from dpejesh on github.
Reviewed-by: Christine Caulfield <992cedbe1eac7dbaff482fcb880a50b57e6b8062@redhat.com>

kgaillot/libqb,rubenk/libqb,gao-yan/libqb,ClusterLabs/libqb,ClusterLabs/libqb,rubenk/libqb,kgaillot/libqb,ClusterLabs/libqb,kgaillot/libqb,gao-yan/libqb