[Clang][CUDA][HIP] Fix Itanium mangler assertion on kernels in template arguments (#248543)
The Itanium mangler made a `GlobalDecl` from a `NamedDecl` when it
mangled a declaration that is referenced from a template argument or an
expression. That c'tor hits an assertion for a CUDA or HIP kernel ("Use
other ctor with GPU kernels!"), because the `GlobalDecl` of a kernel
must tell whether it refers to the kernel or to its host stub.
For example, clang with assertions crashed on this host code:
```
__global__ void kern();
template <auto F> int prepare() { return 0; }
int use() { return prepare<kern>(); }
```
There are three places that needs to be fixed:
`mangleValueInTemplateArg` (the example above), the `DeclRefExpr` case
of `mangleExpression` (a kernel named in an expression in a function
template signature), and `mangleTemplateArgExpr` (the same case with
`-fclang-abi-compat=11` or older).
In this PR, we use the kernel reference kind in these places. Actually,
a clang without assertions already mangled these references as the
kernel, because the kernel kind has the default value 0, so the mangled
names do not change. The default kind on the host is the stub, which
would change the names and make them differ from device compilation.
This PR was assisted by AI but I reviewed all the changes.