hash_equals: Don't leak length difference.

hash_equals leaks difference in length of compared strings.
This implementation ported from Symfony don't.