Fix uninitialized constant error in GitHub.open

The error handling depends on side effects of `require "net/https"`,
so it should be wrapped in an explicit begin block.

cf. #30407.
Use a path attribute instead of self in Keg internals
Keg no longer inherits from Pathname