Support splitting exhaustive tests across cores
Summary:
This is a partial backport of secp256k1 PR808 : https://github.com/bitcoin-core/secp256k1/pull/808/commits/39f67dd072fc44c7c0d27b95610ba8912de56db5
Depends on D7663
Test Plan:
ninja check-secp256k1
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D7664