[JuliaLowering] Implement macro hygiene exemptions for some forms (#62013)
Fix https://github.com/JuliaLang/JuliaLowering.jl/issues/179. Macros
expand with overly-strict hygiene by default (hence `esc` being needed
most of the time), but currently there are a few exceptions where
explicit globals are declared with no hygiene (i.e. always in the
caller's module and never in the macro's module). It's probably too
breaking to begin requiring escaping for these cases, but also difficult
to match what macroexpand.scm does, since what it does is particularly
buggy. This change explores a middle ground by implementing what I think
macroexpand.scm was aiming for: old-style macros do not need to escape
explicit global declarations (including `struct`, `abstract type`,
etc.).
I may want to separate hygiene-compat status from the scope layer, but
this is a pretty good first approximation, and I should write down a
plan before touching this further.
I'll probably want @vtjnash's opinion on this.