fix color allocation algorithm to take into account string lengths
fix color allocation algorithm to take into account string lengths

If a color already has an allocated string of same length as the name we
are allocating a color for, then that color would not be appropriate,
because the eye can't easily distinguish between same-length, same-color
strings.

Instead, try to maximise differences in string length when assigning a
new color, before considering other things like how much a color is
used.

aliclark/irctail,aliclark/irctail