libfetch: keep http auth only if redirect is for the same host

fixes #10688
2 jobs for master in 41 seconds (queued for 1 second)
Status Job ID Name Coverage
  Test
passed #222870
x86_64 docker-alpine
test:alpine

00:00:33

passed #222871
x86_64 docker-alpine
test:debian

00:00:39