Ignore equal elements at the ends of sequences in diffseq()

This fixes the two test cases with non-optimal results.
Add another test case with non-optimal result
A minor documentation update