Marks tls_next_idx and tls_array_count as volatile to prevent VS from optimizing a conditional store into an unconditional store (to avoid a branch) which causes crashes in release build with clients whose imports use static TLS on multi-threaded applications.
Tested on drcachesim -offline on Win10 1909 with a dbghelp where the filed crash reproduces.
Ensuring we have a regression test in the CI is trickier and out of scope for this initial fix.
Fixes #4130 (closed)