Improve extruded polygon and wall performance.

This PR only slightly improves the performance. A few percent here and there but not enough to mention numbers. Most of this PR is removing temporary object creation by using scratch variables.
Can this array get big?  In general, are we adding a lot of scratch arrays like this to the geometry pipeline such that we are going to wind up wasting MBs of memory after the pipeline?  Is it worth creating scratch variables that have a lifetime of the primitive pipeline for a `Primitive` as opposed to the lifetime of the app (perhaps a `clearScratch` function or something along those lines?)?  Doesn't need to be part of this PR, but is something we need to think through.