Revert "[1.4.x] Ensure that passwords are never long enough for a DoS."

This reverts commit 3f3d887a6844ec2db743fee64c9e53e04d39a368.

This fix is no longer necessary, our pbkdf2 (see next commit) implementation
no longer rehashes the password every iteration.
[1.4.x] Fixed #21138 -- Increased the performance of our PBKDF2 implementation.

Thanks go to Michael Gebetsroither for pointing out this issue and help on
the patch.

Backport of 68540fe4df44492571bc610a0a043d3d02b3d320 from master.