Extend internal `_mangledTypeName()` function to take non-copyable types. (#76041)
`_mangledTypeName()` returns the Swift-mangled typename of a given type. This PR extends it to take non-copyable types as well.
Related to our use case in Swift Testing, but not to the PR directly: #69146 #69147 #71112
Resolves rdar://134278607.