Python 3 support.

According to recommendations to other closed pull request I rewrote some code using GMLudo guidelines.

I've used the 'six' module, so now it listed in requirements section of README file, and I basically tested AGI both in Python 2 and Python 3. Seems to me it works fine.

I need some testing for AMI functionaily because I do not use AMI on my installations.

P.S. I also changed some additional files like README and CHANGELOG. Scripts in examples/ directory now run on Python 2 and Python 3.