While working on benchmark code for #1765, I noticed that in some instances we explicitly cast malloc results in the codebase. It seems that there is no good reason to do this in C, and it’s even considered bad practice, see e.g. https://stackoverflow.com/a/605858.
This commit touches mostly test code, the only two functions used in production are secp256k1_context_{create,clone}. Instances were found manually via $ git grep "malloc(".