[clang][DebugInfo] Simplify logic to determine DW_AT_default_value for template parameters
DWARFv5 added support for labelling template parameters with
DW_AT_default_value to indicate whether the particular instantiation
defaulted parameter. The current implementation only supports a limited
set of possible cases. Namely for non-value-dependent integral template
parameters and simple type template parameters.
Useful cases that don't work are:
1. Type template parameters with defaults that are
themselves templates. E.g.,
```
template<typename T1, typename T2 = Foo<T1>> class C1;
template<typename T = Foo<int>> class C2;
etc.
```
2. Template template parameters
`clang::isSubstitutedDefaultArgument` already implement the required logic
to determine whether a template argument is defaulted. This patch re-uses
this logic for DWARF CodeGen.
Differential Revision: https://reviews.llvm.org/D139988