[1.7.x] Fixed #22588 -- Fix RegexValidator __eq__

Compare parameters instead of re.pattern instances, and add the other
parameters to the comparison. Also add a __ne__ to make assertNotEqual
work properly.
Merge pull request #2637 from davidszotten/validator_comparisons

[1.7.x] Fixed #22588 -- Fix RegexValidator __eq__
[1.7.x] Fixed #22563: Ignore AUTH_USER_MODEL errors in from_state
[1.7.x] Fixed #22325: Ignore __first__ dependencies to your own app
[1.7.x] Tests for #22325
[1.7.x] Fixed #22606 -- Locmemcache has_key() failed for infinite cache expiry

Refactored cache expiry logic for Locmemcache to make consistent across
all places where accessed, and correctly handle None as expiry time.
Backport of 66880e4cd from master.