Document and further clean up node creation functions (#60431)
This is cleanup separated from another change where I needed
to call these by hand without `@ast` to help me.
The only significant diff is in syntax_graph.jl, where I've addressed a
TODO I left earlier. Instead of changing `makenode`/`makeleaf`'s behaviour
based on whether `proto` is a SyntaxTree or Kind (there isn't any situation where
we don't know this), split "new node with kind and provenance" functions
`newnode`/`newleaf` and "copy attributes and transform existing node"
functions `mknode`/`mkleaf`. I will accept some function name bikeshedding if
anyone has suggestions.
Other tweaks:
- Remove the attribute-vector parameter since most of the arbitrary
attribute stuff happens in `@ast`, where we just produce `setattr!` calls
- Tighten up some signatures, mostly for documentation purposes, and
because these things are less up-in-the-air than when JL was a new project