Update the error handling of lib/Linker.

Instead of passing a std::string&, use the new diagnostic infrastructure.
Update for LLVM api change.