Fix for PRPR17934; based on a fix suggested by Peter Sommerlad
Refactor for clarity and efficiency.

The PPC GetSymbolFromOperand already prefixed stubs of MO_ExternalSymbol, so
this should be a nop.
Correct test to target 'unknown'
Fix inconsistent diag name
Correct a user-visible static analyzer message typo
Remove dead declarations.
Rename test with misspelt filename
Change the default of AsmWriterClassName and isMCAsmWriter.
Remove dead code.
Remove #if 0 declarations.