* Use the host name from the logged in server for codespace commands
* Fix existing tests
* Add tests for server url configuration
* Rename defaultApiUrl to defaultAPIURL and comment cleanup
* Switch to t.Setenv in codespaces api tests
* Switch to t.Setenv in other tests
* Support custom server in web flows for list and create
* Rename GetServerURL() to ServerURL()
This is already prevented by the API, but this will make the error
message cleaner and easier to understand for the user.
Example of old error message:
```
$ gh cs edit -c cwndrws-redacted -d "some silly name"
error editing codespace: HTTP 422: your codespace has an operation pending: updating to a sku with a different amount of storage; please wait until this operation is complete (https://api.github.com/user/codespaces/cwndrws-redacted)
exit status 1
```
Example of new error message:
```
$ gh cs edit -c cwndrws-redacted -d "some silly name"
error editing codespace: codespace is disabled while it has a pending operation: Changing machine types...
exit status 1
```
gh codespace commands now respect the following environment variables:
- GITHUB_SERVER_URL: typically "https://github.com"
- GITHUB_API_URL: typically "https://api.github.com"
- INTERNAL_VSCS_TARGET_URL: typically "https://online.visualstudio.com"
- GITHUB_TOKEN when CODESPACES is set, even if the host connecting to isn't "github.com".
This set of changes ensures that `gh codespace` commands automatically connect to the right API endpoints when gh is used within a codespace.
Co-authored-by: Mislav Marohnić <mislav@github.com>