[JuliaLowering] Implement flisp-compatible Box optimization (#60567)
This PR implements `_optimize_lambda_vars!` which identifies captured
local variables that can avoid `Core.Box` allocation. Essentially a direct
port of the existing `lambda-optimize-vars!` (from julia-syntax.scm).
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Cody Tapscott <topolarity@tapscott.me>
Co-authored-by: Em Chu <61633163+mlechu@users.noreply.github.com>