Add in HorizontalLegend.

Lists entries side-by-side in the available width, after which the
entries wrap onto the next row. If an entry is too wide it is
truncated. If there are too many entries some rows will not be shown.

Close #755.
That's on Slate. ++r makes the code more compact (increments r, then uses its value), but I can see that it's harder to figure out what's going on if you're not used to seeing it. I'll factor it into more lines.