Move the code that was used to demangle the name of base Smobs into a template function, allowing it to be used for derived classes too.
In LY_ASSERT_SMOB, stop relying on a manually maintained predicate-to-typename table. Instead, use the new function to get the Smob name.
Tested manually with this input:
\version "2.23.5" #(ly:context-name #f) #(ly:item-get-column #f)
Closes #6206 (closed).