[clang-tidy] Fix a false positive in unused-using-decl check

The previous matcher "hasAnyTemplateArgument(templateArgument())" only
matches the first template argument, but the check wants to iterate all
template arguments. This patch fixes this.

Also some refactorings in this patch (to make the code reusable).

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@370760 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed