[clang-tidy] Fix file extension inconsistency (#156528)
This fixes an issue with #150791. In CheckRunner, we treat files with
unrecognized extensions as ".cpp", by forcefully assigning `extension =
".cpp"` if it's not already one of `".c", ".hpp", ".m", or ".mm"`. Make
the new code which chooses the default `-std` argument be consistent
with that, so that using other file extensions doesn't trigger an error
message like `error: invalid argument '-std=c99' not allowed with 'C++'`