With r252791, the C api will install a default diagnostic handler to print to sLastErrorString, therefore
we no longer need to pass around this sLastErrorString to any the LTOCodeGenerator methods.
This patch removes the std::string& argument from a number of C++ LTO API calls and instead
makes them use the installed diagnostic handler. This would also improve consistency of diagnostic
handling infrastructure: if an LTO client used lto_codegen_set_diagnostic_handler() to install a
custom error handler, we do not want some error messages to go through the custom error handler,
and some other error messages to go into sLastErrorString.
The part that I am not entirely sure about is what should happen when there is no installed
diagnostic handler at all. In this patch, the fall-back is to print the message to stderr. For this case
to happen, if the client is using the C api, the client must have explicitly called
lto_codegen_set_diagnostic_handler(nullptr), and maybe the intention is to not print any error at all?
I am not sure.