This implements another part of -save-temps.
After this, the only remaining part is dumping the optimized bitcode. But
currently LLD's LTO doesn't have a non-intrusive place to put this.
Eventually we probably will and it will make sense to add it then.
After this patch, I have some NFC cleanups to make. I'll pull out a
maybeSaveTemp(std::string Suffix, std::function<void(raw_ostream &)>) and
simplify some of the names in the test.