Fix Downloader.update_url_credentials()

We should not try to update the other URL if the base is from a
different domain (or port);

Also, we should not try to update it if it already contains the data we
wanna set. The `ParseResult` instance returned by `urlparse` does not
allow us to change attributes when they are set.
Standardize __future__ imports in all py files
Fix race condition in Index.ensure_path()