Python3 migration

First changes to ensure python 2.6, 2.7 and python 3.x compatibility in future releases:

- import of __future__ statements absolute_import, division, print_function, unicode_literals
- explicit __hash__ methods where method __eq__ is implemented
- providing switch to use getstatusoutput in both Py2 (commands) and Py3 (subprocess)
- replacing keyword print with built in function print()
- replacing dict.iteritems() method with dict.items() method
- replacing StandardError exception with Exception