Clarify error when sort is called with lessEquals

List::sort() recently changed from expecting less-or-equals to
expecting less-than, resulting in an index-out-of-bounds exception
with the wrong comparator.

 * Have library implementation check the comparator first and
   throw an exception if !(x < x). (I think the extra comparison
   is worth the added safety.)
 * Add tests that check that such an exception is thrown.

Closes #90