CLN: simplify `Styler._translate`
Bit of a pre cursor to some other cleaning in #43649.

Prevents needing to pass variables around in worker functions, and has the added benefit of making the CSS classes user editable, by storing as a class attribute instead of module constants.

I ran the updated styler ASVs for this and "BENCHMARKS NOT SIGNIFICANTLY CHANGED"