Support Python 3

This pull request uses [`six`](http://pythonhosted.org/six/) to make XBlock compatible with both Python 2 and Python 3.