[HOTFIX] Add classes to legend rows/entries

Rows on Legend now have the row text as a CSS class.
Entries on HorizontalLegend now have the entry text as a CSS class.

In both cases spaces in the text are replaced with dashes.