fix Issue 13416 - dead-lock in FreeBSD suspend handler

- use pthread internal THR_IN_CRITICAL to retry suspend
add regression test
add some explanatory comments
join the spawned thread before leaving unittest block
cleanup old declarations and import core.memory
Merge pull request #1066 from MartinNowak/gcDecls

cleanup old declarations and import core.memory
Merge pull request #1061 from MartinNowak/fix13416

fix Issue 13416 - dead-lock in FreeBSD suspend handler
typo in docs
Merge pull request #1072 from MartinNowak/typo

typo in docs
use dlopen handle instead of link_map to identify dso

- handle is the natural identifier of a loaded DSO

- it's easier on FreeBSD to get obtain an handle from a
  DSO internal address than to get the link_map
Shared builds for FreeBSD and mv sections_linux to sections_elf_shared
make sections_elf_shared work with FreeBSD

- use local symbol to get handle of druntime
- relocate elf stringtable entry
- dlopen(RTLD_NOLOAD) increfs on linux, but not on FBSD
- use getprogname instead of program_invocation_name
use specialized _rtls_add_phdr on FBSD

- also add @nogc overload to dl_iterate_phdr and such
fix tests

- C host must explicitly be linked against pthread

- need dummy ref to _d_dso_registry to support weak linkage