optionsToClasses: Concentrate deprecated code in a single extension
Selectmenu: Implement classes option

Fixes gh-7731