groupbox:  allow hiding of empty groups

By default, show all groups.  However, allow the user to hide groups
that have no windows if specified.

Note that I removed the enumerate call where the enumeration was actually unused and instead just iterated over the set.