Use six.moves for urllib changes

This changes our code to use the six.moves adapters for calls into
urllib/urllib2/urlparse. This makes it so that we can run the same code on both
python 2 and 3.

Testing done:
- Ran unit tests.
- Checked that rbt post still worked.

Reviewed at https://reviews.reviewboard.org/r/6604/