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

This reverts commit 22b74fa09d7ccbc8c52270d648a0da7f3f0fa2bc.

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