Instead of maintaining a copy of a ClipRegion etc, flatten
any input clip structures into a list of simple clips.

This simplifies some of the mask cache code, and is also
prep work for some further simplifications and optimizations
to how we handle the mask cache structures.