Compare with "<" when finding shortest curie.

Since _compare_shortest_least() is now a key function we need to compare
the keys directly instead of relying on a cmp()-style return code.