Python 3 support
Merge branch 'master' into 'python3'

Conflicts:
	tests/test_api.py
Renames base* to *_types in compat.py

* basestring -> string_types
* baseint -> int_types
Merge branch 'python3' into 'master'