Preparation for non-constant lambda models (#7604)
This makes our core model construction amenable to (non-constant) lambdas as assignments to function equivalence classes for higher-order.
We currently only generate almost constant functions for values of functions. After this PR, we allow explicitly provided lambdas as representatives provided by a theory, which will be used by the higher-order extension.
It also makes some improvements to debug check models regarding checking when representatives are equal to their model values.