Move api_client to github_api.rb

so it can be used from context.rb and commands.rb; reduces duplication