Add #[weak] weak symbol support.

A weak symbol is a symbol that may or may not exist at run-time.
If the symbol exists, the dynamic linker links it into the program's
address space in the usual fashion.  If it does not exist, references
to the symbol are set to NULL.  It lets us do feature checks at run-time
without going through an expensive dlopen/dlsym/dlclose cycle first.

Caveat emptor: it is up to the program to verify that the symbol is
non-NULL before using it.
Link weakly to __pthread_get_minstack().

Use the weak symbol support that was added in the previous commit to
link weakly against __pthread_get_minstack().  Significantly reduces
the thread creation overhead because Thread::imp::create() no longer
goes through a dlopen/dlsym/dlcose cycle for each new thread.