Add support for optgroup

Proposed changes won't wipe out optgroup data from select2 multi-select.