Major TLS cleanups.
* The RTLD no longer attempts to set up an initial TLS. The job has been
moved to libc. The RTLD does not use TLS itself. The
allocate_initial_tls() function has been removed.
* The _init_tls() call made by CRT1 is no mandatory.
* The RTLD no longer calls the library _init() functions early. Instead it
sets up a callback that allows CRT1 to call the library _init() functions
after it has called _init_tls().
* LIBC now has a _libc_init_tls() function which is weakly bound as
_init_tls(). This function initializes the TLS for the program (generally
by calling the _rtld_allocate_tls() and then doing any required
post-allocation initialization). In the absence of a threading library
this function is basically it.
Threading libraries may replace _init_tls() with their own version. This
does not yet occur as of this commit. The threading library would then
almost certainly call _libc_init_tls() and then make further modifications
to the TCB as necessary (e.g. populate the tcb_pthread field).
* RTLD's allocate_tls() no longer does anything fancy. The 'old_tcb' argument
and concept has been removed.
* We have a new tcb_errno_p field in the TCB, but as of this commit it
is not yet being used.
Reviewed-by: Joerg Sonnenberger <joerg@britannica.bec.de>,
David Xu <davidxu@crater.dragonflybsd.org>