```
Fixes #823.
```
Backport 1/11 of sepccp256k1 PR830.:
https://github.com/bitcoin-core/secp256k1/pull/830/commits/6173839c90553385171d560be8a17cbe167e3bef
Note: the first `memcmp()` in `recovery/tests_impl.h` was removed in
D2193.
Depends on D8036.