Seemingly unrelated, yet related commits improving our handling of Link headers

A big hug to @karlcow for his code contributions in 980669e, which he sent by email. I did tweak it a bit, so still pinging him for review.

r? @karlcow.