Add support for grouping options, similar to optgroup in select elements.