Enforce safe usage of DiagnosticsEngine::getCustomDiagID()

Replace the last incorrect uses and templatize the function to require a
compile-time constant string preventing further misuse.

The diagnostic formatter expects well-formed input and has undefined behaviour
with arbitrary input or crafted user strings in source files. Accepting user
input would also have caused unbounded generation of new diagnostic IDs which
can be problematic in long-running sessions or language bindings.

This completes the work to fix several incorrect callers that passed user
input or raw messages to the diagnostics engine where a constant format string
was expected.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@200132 91177308-0d34-0410-b5e6-96231b3b80d8
[CMake] Reindent.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@200133 91177308-0d34-0410-b5e6-96231b3b80d8
Update for llvm api change.

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@200136 91177308-0d34-0410-b5e6-96231b3b80d8
Update docstrings following the param name change in r200132

git-svn-id: http://llvm.org/svn/llvm-project/cfe/trunk@200137 91177308-0d34-0410-b5e6-96231b3b80d8