Add missing critical section locking before accessing shared variable.
WinThreadStart() in wxMSW wxThread implementation accessed the variable
containing the thread state without locking which was wrong, do it only inside
the critical section.
Notice that there is still an unavoidable race condition between exiting the
thread and starting it, so it's not clear at all if we should try to avoid
calling DoThreadStart() here.
Closes #14865.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73125
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775