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

:warning: This initially failing PR is an TODO item for `am/apply` commands. We need to switch them over to the GitHub API so that they won't have any external dependencies.

/cc @jingweno
Also, we need a test that verifies a very important condition: that the http client **won't** rewrite URLs if OverrideURL is nil. So, we should initiate `newHttpClient("", false)`, make a request to the test server, and verify that the hostname (probably just "127.0.0.1") is unchanged and that `X-Original-Scheme` was not set.