util: Introduce ToIntegral<T>(const std::string&) for locale independent parsing using std::from_chars(…) (C++17)
Summary:
util: Avoid locale dependent functions strtol/strtoll/strtoul/strtoull in ParseInt32/ParseInt64/ParseUInt32/ParseUInt64
fuzz: Assert equivalence between new and old Parse{Int,Uint}{8,32,64} functions
test: Add unit tests for ToIntegral<T>(const std::string&)
refactor: Remove unused ParsePrechecks from ParseIntegral
Also:
- Remove redundant {} from return statement
- Add missing failing c-string test case and "-" and "+" strings
- Add missing failing test cases for non-int32_t integral types
Remove unused ParseDouble and ParsePrechecks
This is a backport of core#20457 and core#23156
Test Plan: ninja all check-all bitcoin-fuzzers
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D17147