[secp256k1] Remove usage of CHECK from non-test file
Summary:
Currently CHECK is used only in test and bench mark files except for one
usage in ecmult_impl.h.
We would like to move the definition of CHECK out of util.h so that
util.h no longer has a hard dependency on stdio.h.
Done in preparation for moving the definition of CHECK as part of an
effort to allow secp256k1 to be compiled to WASM as part of
rust-secp256k1.
This is a backport of secp256k1#1149
Test Plan: ninja check-secp256k1
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D19573