perf: only change options in the compiler checkpoint when tracing or checking

The checkpoint between compiler passes wrapped every declaration in `withOptions` to set `pp.motives.pi` for its trace output and for the check enabled by `compiler.check`, whether or not either was on; that cost an option insertion, a fresh `Core.Context` and the resolution of its derived fields per declaration per pass, about 1% of the instructions spent on small modules. The options are now changed once per checkpoint, and only when the `trace.Compiler.<pass>` class is enabled or the pass runs the check.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 file changed