secp256k1_memcmp_var was introduced in 6173839c90553385171d560be8a17cbe167e3bef to avoid GCC bug 95189, which may miscompile memcmp. This PR follows the suggestion in #823 (comment) to get rid of the function and to guard against affected compilers with a self-check instead.
Closes #823.