Improve linker messages when modules differ in triple or data layout.

This is a backport of r203009 from LLVM trunk. Since we recently changed triples
and data layouts, this is particularly apropos.