[secp256k1] Prevent dead-store elimination when clearing secrets in examples
Summary:
prevent optimization in algorithms
Add secure_erase function to clear secrets
Update the function with good practices
Renaming random.h to examples_util.h
Signed-off-by: Harshil Jani <harshiljani2002@gmail.com>
This is a backport of secp256k1#1212
Test Plan: ninja secp256k1-examples
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D19817