[WIP] url-related functions accept bytes and unicode and return bytes

Fixed functions: 

* safe_url_string
* safe_download_url
* is_url
* get_base_url
* get_meta_refresh

There could be a few other to fix. See also: https://github.com/scrapy/scrapy/pull/837