First batch of code changes for legend item hiding.
More code for implementing hiding legend item.

Completely reworked the way pattern repeat item legends
are tracked. They used to be "special" but are now just
like any of the other legend items simplifying the code
quite a bit.
Cleaned up all instances of obsolete repeatLegend list