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 pull request #587 from dawgfoto/refactorMain

reuse rt_init/rt_term in main
Merge pull request #589 from dawgfoto/threadTermLocks

add explicit thread_term call to replace atexit
perform runtime and module initialization when loading DSOs
publish C interfaces rt_loadLibrary/rt_unloadLibrary

- use C strings for rt_loadLibrary
- add rt_loadLibraryW for wide C strings
- move char[] to C string conversion to Runtime.loadLibrary
prevent HashTab manipulation during opApply iteration
Fix issue 10894: added missing or renamed DDoc parameters (found by fix to 10236)
Fix issue 10894: fixed typos
Fix it so that test_runner works with DIP 37.

As currently implemented, test_runner blows up when it hits a package.d
file, because the module name does not match the file name. This fixes
it so that the name of the package is used in that case.
Merge pull request #589 from dawgfoto/threadTermLocks

add explicit thread_term call to replace atexit
Merge pull request #590 from dawgfoto/autoInit

perform runtime and module initialization when loading DSOs
Merge pull request #591 from dawgfoto/loadLibraryC

publish C interfaces rt_loadLibrary/rt_unloadLibrary
Merge pull request #599 from jmdavis/dip37_fix

Fix it so that test_runner works with DIP 37.
Merge pull request #598 from lionello/bug10894

Fix issue 10894: added missing or renamed DDoc parameters (druntime)
low-level implementation of dynamic loading

- implement rt_loadLibrary/rt_unloadLibrary in src/rt/sections_linux.d
- keep hashmap from link_map* to DSO* structs to gather library
  dependencies and perform thread initialization
- thread local reference count to trigger TLS ctors/dtors
- add core.thread interface to inherit loaded libraries when spawning
  a new Thread
- 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
- the static libphobos2.a does not depends on libdl
add unittests for shared libraries

- test EH, GC, init/fini and ModuleInfos for linked and loaded D libraries
add C tests

- linkD - links a D library
- loadD - links druntime, loads a D library
- loadDR - loads druntime, loads a D library
add tests with dependent libraries
add test for C host with D plugins
Merge pull request #593 from dawgfoto/dynamicLoading

dynamic loading