Optimize CSS Export: extract similar rules into combining CSS block

Tests are pending… Comments are welcome.
s/ii/end/ or s/ii/numRules/ maybe? but doesn't really matter.