Add support for following HTTP 307 temporary redirects.

Should fix [Android bug 41739](http://b.android.com/41739).

I added some test cases to verify the specified behaviour, and tested this with an Android app which uses a server returning 307s.
Let me know whether this looks reasonable.