BUG: Fixed spacegroup ordering in Python 3

Replaced cmp() with Python 3 compatible rich comparison methods.