initial attempt at `get_redirect_target`

This is the first attempt at a PR to address my proposal #3837 to support pluggable redirect handling.  Feedback is welcome.

This does not break existing tests and adds a new test to for handling malformed 200+location responses using a custom session mixin.

I've been testing it for a day and it seems to be fine.

Thank you for simply considering this, and even more thanks for all the suggestions and advice in the related thread.  It has been a long week of little sleep trying to pin down some issues.  

# [Codecov](https://codecov.io/gh/kennethreitz/requests/pull/3846?src=pr&el=h1) Report
> Merging [#3846](https://codecov.io/gh/kennethreitz/requests/pull/3846?src=pr&el=desc) into [master](https://codecov.io/gh/kennethreitz/requests/commit/ad65b0cb19124b5ae4dd01bf19d82c16ffb2485d?src=pr&el=desc) will **increase** coverage by `<.01%`.


```diff
@@            Coverage Diff             @@
##           master    #3846      +/-   ##
==========================================
+ Coverage   89.05%   89.06%   +<.01%     
==========================================
  Files          15       15              
  Lines        1873     1874       +1     
==========================================
+ Hits         1668     1669       +1     
  Misses        205      205
```


| [Impacted Files](https://codecov.io/gh/kennethreitz/requests/pull/3846?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [requests/sessions.py](https://codecov.io/gh/kennethreitz/requests/compare/ad65b0cb19124b5ae4dd01bf19d82c16ffb2485d...70f31a3166c1f9470b5cfad888f828357c1daadd?src=pr&el=tree#diff-cmVxdWVzdHMvc2Vzc2lvbnMucHk=) | `92.83% <100%> (+0.02%)` | :white_check_mark: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/kennethreitz/requests/pull/3846?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/kennethreitz/requests/pull/3846?src=pr&el=footer). Last update [ad65b0c...70f31a3](https://codecov.io/gh/kennethreitz/requests/compare/ad65b0cb19124b5ae4dd01bf19d82c16ffb2485d...70f31a3166c1f9470b5cfad888f828357c1daadd?el=footer&src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

I originally hoped to change the while-loop.  I found it a difficult to decipher what is going on, as it's doing a lot of copying/resetting of vars and prepping for the next iteration. I admittedly missed some obvious behaviors in it.

In terms of maintenance and readability, I agree a generator or closure would likely be better.    Tracking the iteration with `i` could be replaced by just referencing `len(history)`too.

💫✨🍰✨💫

this is great. 

here's a quick edit to get rid of that `i`:

https://github.com/kennethreitz/requests/commit/6c40707b93f98fac9a7982cc5f50521079b155b8

IMHO this is a bit cleaner to understand.  it not only removes the `i` (i found it annoying), but instead of having to handle the weird iteration conditions and copying the history via`list`, just uses an array slice to create a new list excluding the first element.

Yup, that does seem like a positive step.

Should I merge that change into this PR?

Let's give it a try and see how it looks.

needs a rebase!

Rebased, but a conflict on the `AUTHORS.txt` left an ugly merge commit :(

I pulled in the clarification to the while-loop too.

I *really dislike* how the while-loop handles the history, but I'm still trying to clean it up. 

So FWIW, it may be easier to cherry-pick the commits you need to a new branch and force-push it up to this PR. You dragged a whole bunch of other history into the PR which makes reviewing it really hard.

Actually, I'm going to manually patch and then force-push.  That'll give you one commit. Sorry about this.  Git is often not my friend.

Cleaned up.  Sorry for the mess.

💫✨🍰✨💫