Tweak URI implementation for compatibility with stdlib

When `url.scheme` is changed from "https" to "http" when someone configured their Enterprise instance to be used over insecure protocol, the "speedy" implementation changed the port as well, but the stdlib implementation doesn't. Things would break if someone used hub in an environment where stdlib URI was already loaded, like for instance from RubyGems.

Fixes #625

/cc @masarakki