[3.11] gh-98433: Fix quadratic time idna decoding. (GH-99092) (#99222)

There was an unnecessary quadratic loop in idna decoding. This restores
the behavior to linear.

(cherry picked from commit d315722564927c7202dd6e111dc79eaf14240b0d)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
3 files changed