[backport#17342][refactor] Remove global int nScriptCheckThreads
Summary:
The global nScriptCheckThreads int is confusing and is only needed for
its int-ness in AppInitMain. Move all -par parsing logic there and
replace remove the int nScriptCheckThreads with a bool g_parallel_script_checks. (see D521)
Also tidy up logic and improve comments.
https://github.com/bitcoin/bitcoin/pull/17342/commits/5506ecfe7a65d5705616bc048f2f1735b89993fb
Concludes backport of Core PR17342
Depends on D7274
Test Plan:
ninja check check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7275