Fix module importing issues for Python 3

Copy py3kcompat from oslo for urlparse
Substitute StringIO / httplib with six

Partial Implement: blueprint py33-support

Change-Id: Ic8da2ca53b4217ef13f15be094437f1f4e643001
Translate print statement to print function

Use "from __future__ import print_function"
docs.python.org/3/howto/pyporting.html#from-future-import-print-function

Partial Implement: blueprint py33-support

Change-Id: I92fc07257851795a9972c8273d3278c8679d6628
Use six.iteritems() for dict

Fix the error:
AttributeError: 'dict' object has no attribute 'iteritems'

Partial Implement: blueprint py33-support

Change-Id: I5dff17d1df01d6583f882f818434804d65726c51
Import urlutils to substitute urllib

Use the openstack common urlutils.

Partial Implement: blueprint py33-support

Change-Id: I45f21d7316fe87952e841004d4c25999138a842b