globals: Also use thread-specific storage on "main" thread Don't treat "main" thread specially. This simplifies access to thread-specific data. xmlGetGlobalState can now also fail on the former main thread, leading to an unrecoverable condition if malloc fails. The globals were never defined in public header files when compiling with thread support. Now they're only defined in a legacy build. Move TlsFree to DllMain to make cleanup more robust on Windows. Obsoletes #1.