Disable thread_local for i686-mingw

Authored by Fabien on Mar 27 2020, 12:15.


Disable thread_local for i686-mingw

This is a follow-up for D5540. Despite the tests passing, the diff is
causing bitcoin-qt to fail quickly. Disabling thread_local for this
compiler fixes the issue.

The code is extracted from PR15849, but the tests for thread_local is a
simplified version.

Test Plan:
Build for win32 with autotools and cmake. Run bitcoin-qt and check it
doesn't crash.

As a sanity check, build for win64 and any linux and check
thread_local is enabled.

Reviewers: #bitcoin_abc, jasonbcox

Reviewed By: #bitcoin_abc, jasonbcox

Subscribers: jasonbcox

Differential Revision: https://reviews.bitcoinabc.org/D5587