Implement `cargo-{upload,login}` commands

The cargo-upload command will take the local package and upload it to the
specified registry. The local package is uploaded as a tarball compressed with
gzip under maximum compression. The host to upload to is specified, in order of
priority, by a command line `--host` flag, the `registry.host` config key, and
then the default registry.

Uploading requires a token from the api server, and this token follows the same
config chain for the host except that there is no fallback. To implement login,
the `cargo-login` command is used. With 0 arguments, the command will request
that a site be visited for a login token, and with an argument it will set the
argument as the new login token.

The support for these commands is quite bare-bones at the moment and is not very
user-friendly. The purpose of this is to lay the groundwork for future
improvements.