add optgroup support to list select tag processing

when processing a folder, use optgroup for the folder, with option tags for the folder's children