Fix getCustomDiagID() usage in example code

This was setting a bad example. DiagIDs are a limited resource and the message
argument is evaluated as a format string.
Fix getCustomDiagID() usage in CodeGen and TextDiagnosticBuffer

DiagIDs are a cached resource generally only constructed from compile-time
constant or stable format strings.

Escaping arbitrary messages and constructing DiagIDs from them didn't make
sense.