Porting to Python 3

General Python 3 fixes to `qds-sdk-py` including manual and automatic fixes from `2to3`.  I tested it with a few queries and it seems to work fine.

The changes should be added to a **separate branch** (e.g. `python3`) since the code included is Python-3 only. 

A couple of notes:
* GitHub doesn't support the specification of a new branch at PR time (unless the PR user has upstream permissions to the original repo, and I don't), so I did the PR to `master`. The repo manager should be able to split them though.
* Travis CI tests should target Python 3.X otherwise they will fail (as they currently do)