Controlgroup fixes

Hi.
I found that refresh was called twice when creating controlgroup widget. First from method _setType() and then from _init(). I used _initialRefresh property to determine if options are set when widget is created. I've checked that changing type with $().controlgroup('option', 'type', 'vertical') still works :) There should probably be test added.
I also added some small performance fixes:
- removed ui object
- create legend wrapper only when it is needed