[proofs] [sat] Have SAT solver communicate whether it has optimized the assertion level of a clause (#8399)
This way both the SAT proof manager and the Proof Cnf Stream can properly track
proofs for clauses added at assertion levels below their original user level.
This commit, besides some minor tweaks, adds the hooks in the places where
a clause can be created with an optimized level and we need to track:
when the explanation of a propagation is requested
when a clause/lemma is added
when a lemma is added (from the backlog of lemmas added when Minisat was busy)
For clauses derived via resolution, this information is computed directly in the SAT proof manager.
This commit also reverts a change from #7790 where whether to optimize clauses was computed only once for the SAT solver. This cannot be the case because between different check-sat calls the state can change.
Finally, this commit enables proofs for several regressions that were previously incompatible with proofs. Since now proofs are compatible with optimizing the level of clauses during incremental solving, this commit should lead to performance improvements.
Fixes cvc5/cvc5-projects#314