Reuse view_context_class when possible
Reuse view_context_class when possible

The generated view context classes tend to be fairly complex and use a
lot of memory. Similar to how we only generate new helper classes when
necessary (see https://github.com/rails/rails/pull/40204) we should be
doing the same for view context classes.

yawboakye/rails,georgeclaghorn/rails,kddeisz/rails,MSP-Greg/rails,rails/rails,Erol/rails,Edouard-chin/rails,Erol/rails,BlakeWilliams/rails,esparta/rails,kmcphillips/rails,kddeisz/rails,yahonda/rails,Edouard-chin/rails,esparta/rails,yahonda/rails,kmcphillips/rails,yawboakye/rails,esparta/rails,Edouard-chin/rails,esparta/rails,rails/rails,MSP-Greg/rails,Erol/rails,kmcphillips/rails,MSP-Greg/rails,kddeisz/rails,BlakeWilliams/rails,yahonda/rails,yawboakye/rails,georgeclaghorn/rails,georgeclaghorn/rails,yahonda/rails,kmcphillips/rails,Erol/rails,BlakeWilliams/rails,yawboakye/rails,rails/rails,Edouard-chin/rails,BlakeWilliams/rails,kddeisz/rails,MSP-Greg/rails,rails/rails,georgeclaghorn/rails