utils: Use _wfopen and _wreopen on Windows
Summary:
The fopen function does not support unicode filename on Windows, so use Windows specific function do deal with it
This is a backport of Core PR13866
Test Plan:
ninja && ninja check
Use the build bot to run tests on windows.
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D8343