Make Repository comparisons work

Firstly, the __lt__ method was broken.
Secondly, I hadn't specified total_ordering for the class.
Thirdly, I hadn't provided a __ne__ method.

Fixed.