[Serialization] Hash inner template arguments
The code is applied from ODRHash::AddDecl with the reasoning given
in the comment, to reduce collisions. This was particularly visible
with STL types templated on std::pair where its template arguments
were not taken into account.
Reviewed as part of https://github.com/llvm/llvm-project/pull/133057