Decentralize per-thread initial special bindings.
This change ensures that initial bindings in the main thread are made like in
other threads. They weren't, because INITIAL-THREAD-FUNCTION-TRAMPOLINE never
gets called for the main thread. The effect was that the main thread's value of
any of the affected symbols resolved to the global value unless later rebound.
Consequently it was not possible to optimize out the no-tls-value-marker check
for references to them. Such an optimization becomes possible now.
This change also revealed a few other tidbits:
- Absence of a binding for *HANDLER-CLUSTERS* during genesis was the likely
reason for inability to muffle warnings during cold-init.
- STREAM-REINIT saw the old global value of *CURRENT-THREAD* from a dumped core
rather than new value.
Other improvements aside, it's best not to state each variable's initializer
in two places - in the DEFVAR and in the thread creation trampoline.
16 files changed: