Fixed #23682 -- Enhanced the test client circular redirects detection.

When the test client detects a redirect to a URL seen in the
currently followed chain it will now raise CircularRedirectError,
rather than just returning the first repeated response.

It will also complain when a single chain of redirects is longer
than 20, as this often means a redirect loop with varying URLs, but
even if it's not actually one, such long chains are likely to be
treated as loops by browsers.