Create new Session method `prepare_redirected_request`.

This is almost entirely moving code around: the new method is
most of the code that used to be the loop body of `resolve_redirects`.