util: Use strerror_s for SysErrorString on Windows
https://github.com/bitcoin/bitcoin/pull/24933/commits/e7f2f77756d33c6be9c8998a575b263ff2d39270
util: Refactor SysErrorString logic
Deduplicate code and error checks by making sure s stays nullptr
in case of error. Return "Unknown error" instead of an empty string in
this case.
https://github.com/bitcoin/bitcoin/pull/24933/commits/718da302c7b11b375042c3000d421fd93348c199
util: Increase buffer size to 1024 in SysErrorString
Increase the error message buffer to 1024 as recommended in the manual
page (Thanks Jon Atack)
https://github.com/bitcoin/bitcoin/pull/24933/commits/f00fb1265a8bc26e1612c771173325dbe49b3612
This concludes backport of core#24933
Depends on D16209