Tidy up urlfetch.py exception handling

IOError doesn't seem appropiate for things like invalid URL scheme
and template exceeding max size. And requests.RequestException means
an ambiguous exception occurred while handling requests, not
necessarily an IO error.

Change-Id: Ib8108a5b9bf6d6c99545a1c29735521720d3a75a
Replace str with six.text_type in tests

Replace str with six.text_type in necessary places, so that lazy
translation can be enabled in subsequent patches.

Change-Id: I40732ec7e9f53b3cb487880965797253452f95cd
Merge "Tidy up urlfetch.py exception handling"
Merge "Replace str with six.text_type in tests"