Replaced all URLs with URIs

The URL class is slow and broken. This commit replaces all the
occurrences of URL that have something to do with the network. URL is
still used for file resources but that's ok.

Fixes #322