Optimize CSS Export: extract similar rules into combining CSS block

Tests are pending… Comments are welcome.
Why do you declare i in front of the loop? Should be consistent IMO.