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
Yeah, it would be too hard to edit these tests to make them pass and I would essentially be duplicating the API stubs from cukes.