[JuliaLowering] Fix placeholders in parameters and decls, work around `hasmethod` (#60140)
Moved from https://github.com/c42f/JuliaLowering.jl/pull/99
----
- Fix placeholders in positional and keyword arguments.
- Placeholder positional arguments sometimes need to be read from due to the
way we desugar keyword functions; give them an internal name. (fix
https://github.com/c42f/JuliaLowering.jl/issue/55, port
https://github.com/JuliaLang/julia/pull/58803)
- Positional arguments may contain duplicate placeholders
- Keywords may be placeholders (which is strange) but may not be duplicates
- `kws...` may use a placeholder (fix
https://github.com/c42f/JuliaLowering.jl/issue/49)
- Allow placeholders in decls: `local`/`global _`, `local`/`global _::T`. This
can be produced by destructuring assignments. I've implemented this to
always drop the type (see
https://github.com/JuliaLang/julia/issues/57497), but this may not be what we want.
- Work around `hasmethod` always returning false for
`world=typemax(UInt)` (some
discussion [here](https://github.com/JuliaLang/julia/pull/59808)). I'm
not sure we should be using `hasmethod` in the first place.
- Comment out our `@atomic` implementation. We need to implement this
for all forms that the normal `@atomic` takes, otherwise it hijacks the
expansion and expects a simple form.