ROOT-5519. Use getNameAsString instead of getName.

The difference is that getName gives a ptr to the IdentifierInfo of the declaration.
In cases where the declaration has implicit name (operators, ctors, dtors) clang
doesn't store IdentifierInfo and asserts.

In the general case this can be fixed by using getNameAsString. There is a trade-off
going via temporaries and std::string copies, which in the most cases is inevitable.