hash_equals: Don't leak length difference. (Bug 67939)

`hash_equals` leaks difference in length of compared strings (this is a documented behavior).
It prevents from using `hash_equals` as a remplacement of Symfony, Zend Framework and Joomla PHP implementation of constant-time string comparison.
This implementation ported from Symfony don't (or less).

The discussion started in a try to use `hash_equals` in Symfony: https://github.com/symfony/symfony/pull/11797

(Reopened against the 4.6 branch.)

- [x] Use CPython tricks https://github.com/python/cpython/blob/c7688b44387d116522ff53c0927169db45969f0e/Modules/_operator.c#L175
Inspired