Add streamed versions of getQualifiedNameAsString.

Move the cold virtual method getNameForDiagnostic out of line.