Issue 12720: Non-int integral template parameters not mangled correctly

The name mangling of templates should use the parameter type if given.

E.g. `struct sliceBits(size_t from, size_t to)` should mangle the type parameter as `size_t` even if an int value is given.

The code which is currently commented out does not compile and is incomplete. This commit fixes this.