Reimplement HUB_TEST_HOST support using a custom http.Transport

In testing, we want to redirect all requests to a local test server
pretending to be GitHub API, but we want them to preserve their original
"Host" header. A good place to do that transparently is the `RoundTrip`
method that handles every request for this http.Client instance.
Expect encoding declaration in "Accept" HTTP header
Have `am/apply` use API for getting patches instead of curl

This enables fetching patches from private repos that you have access to.
TempFile already uses TempDir by default
Use io.Copy to write an io into the tempfile
Add Go test for overriding URL
Merge pull request #601 from github/no-curl

gh: Move away from using curl for patches and to GitHub API