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
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.