merge C/C++ linkage workaround

git-svn-id: https://svn.code.sf.net/p/mingw-w64/code@6433 4407c894-4637-0410-b4f5-ada5f102cad1
Prepare new release: fix some winpthreads deadlock and add workarounds for C++ linkage bug in intrin.h

git-svn-id: https://svn.code.sf.net/p/mingw-w64/code@6434 4407c894-4637-0410-b4f5-ada5f102cad1