primeLayout: rewrite to avoid iterated transformations

iterated calls to transformations tend to be slow.  This is especially notable in the Poster.hs benchmark, which sees about a 30% speedup (on my system) with this change.  Also see the note and `squares'` in diagrams-bench:/Rotations.hs.

Ideally calling iterateN on transformations should be much faster, but I think that may require significant changes to the current Transform type.