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
The whole point of OverrideURL is that it rewrites Host and Scheme. This test doesn't verify that, as it makes a request to the same host:port that the test server is running at.

Instead, try to make a request to "https://example.com" and verify that the `X-Original-Scheme` is "https" and that the request host was "example.com".