Clarified Float64 interning locking conditions.

Factored out condition in variable.
Locks around the shutdown functions.

See grace_register_shutdown_function and grace_run_shutdown_functions.
Localised some of the thread specific state.

Thread specific state is now stored in a thread local pthread_key_t
variable. The state is defined in the ThreadState structure in
"gracelib_threads.h".