Python 3 compatibility

This changes enable Python3 compatibility, although at a cost to a minimum supported Python of 2.6 due to the:
```python
from __futures__ import unicode_literals
```
which turns all string literals into unicode.

I also changed the imports to be fully qualified, as this was breaking Python3 as well.

There is another pull request that uses 2to3, and I tried that one first. Although it allowed installation, many of the functions were not working, and 31 of the test failed. 2to3 also complicates maintenance.

Tested on python 2.6, 2.7, 3.2 and 3.3