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

This reverts commit 5ecc0f828ebe270cfc92a0a2bfb4268800907904.

This fix is no longer necessary, our pbkdf2 (see next commit) implementation
no longer rehashes the password every iteration.
[1.6.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.