Add rich comparison methods, since Py3 doesn't go in for __cmp__.