Adds posibility to add <optgroup>'s to selectboxes. 

Hi!
We had a scenario where a select box would get too large to be usable if i couldn't get it categorised with `<optgroup>`'s. Hence this modification. Feel free to merge it if you think it looks ok.

/Anders