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.
> I could set the length to zero after the entire wall is subdivided.

I might be out of the loop, but I thought that does not free the memory.