[secp256k1] [ECDH API change] Support custom hash function
Summary: This is a backport of secp256k1's PR354
Test Plan:
ninja check-secp256k1
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D4956