HorizontalRuleLabels: avoid modifying labels property in prototype.

Also did a bunch of test cleanup/reorg, including splitting the unit
tests from test_Slider.html into a dedicated file (Slider.html).

Fixes #18113.