Implement WikibasePage.__cmp__ with a unit test.

https://mediawiki.org/wiki/Special:Code/pywikipedia/11701