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.
It's only one `padding` because the other `padding` is part of the length of the entry, which ensures that there will be `padding` space between entries on the same row. This approach is similar to that used by Bootstrap in their dynamic layouts.

If `longestRowLength` is zero, it asks for `padding` space? It should only happen if there's no rows.