Fix urllib.parse (urlparse) handling

Revert "Fix "'module' object is not callable" error", and fix it properly.

* The urlparse module is renamed to urllib.parse in Python 3.
* This commit fixes the code to use "urllib.parse.urlparse"
  instead of creating a new module urlib and setting
  urlib.parse to urlparse.urlparse.
* Fixes an AttributeError:
  'function' object has no attribute 'uses_relative'

This reverts commit cd51f17c643370e6199216462c1be36f04d57291.

Change-Id: I48490b20ecd19cf5a6edd835506ea5a467d556ac
diff --git a/subcmds/sync.py b/subcmds/sync.py
index 930211c..c7f02b3 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -34,7 +34,7 @@
   import urlparse
   import xmlrpclib
   urllib = imp.new_module('urllib')
-  urllib.parse = urlparse.urlparse
+  urllib.parse = urlparse
   xmlrpc = imp.new_module('xmlrpc')
   xmlrpc.client = xmlrpclib
 
@@ -509,7 +509,7 @@
                   file=sys.stderr)
           else:
             try:
-              parse_result = urllib.parse(manifest_server)
+              parse_result = urllib.parse.urlparse(manifest_server)
               if parse_result.hostname:
                 username, _account, password = \
                   info.authenticators(parse_result.hostname)