add explicit thread_term call to replace atexit

- When calling rt_init/rt_term from ELF's .ctors/.dtors section
  atexit runs before rt_term, which causes a crash because the
  thread locks are already destroyed.
Merge branches 'autoInit' and 'loadLibraryC' into HEAD
low-level implementation of dynamic loading

- implement rt_loadLibrary/rt_unloadLibrary in src/rt/sections_linux.d
- keep hashmap from dlopen handles to DSO* structs to run
  thread local constructors/destructors
make dynamic loading functions only available for version (Shared)

- set -version=Shared when building a shared druntime
- loading a shared library when statically linking against
  druntime will cause a link error
- Runtime.loadLibrary and Runtime.unloadLibrary are templated
  so that they are only linked when actually used
- nice side effect, the static libphobos2.a no longer depends on libdl
use link_map* instead of dlopen handle to find DSO*

- This avoids poking in glibc internals because
  there is an API that retrieves the link_map* for
  a handle.
- Note for glibc the handle is the link_map*.