[secp256k1] Allow to use external default callbacks
Summary:
- Replace CHECKs for no_precomp ctx by ARG_CHECKs without a return
- Allow usage of external default callbacks
- Include stdio.h and stdlib.h explicitly in secp256k1.c
- Add secp256k1_ prefix to default callback functions
- Add missing #(un)defines to base-config.h
- cmake build
This is a backport of libsecp256k1 PR595
Test Plan:
Ran unit tests, it doesn't break anythign at least.
cmake -GNinja .. -DSECP256K1_ENABLE_EXTERNAL_DEFAULT_CALLBACKS=ON ninja check-secp256k1
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D5308