llvm::lld::link() calls llvm::lld::enableColors() before initializing
the streams llvm::lld::stdoutOS and llvm::lld::stderrOS. This is a
problem because enableColors() uses stderrOS indirectly via a call to
lld::errs(). It can lead to random behavior if the lifetime of the
object passed as stderrOS in link() expires before a subsequent
invocation of link().
This commit remove enableColors() altogether and replace it by calls to
enable_colors(), making it explicit on which stream to enable colors.
link() is then changed to invoke enable_colors() on stderrOS.
Let's remove enableColors and replace it with stderrOS..enable_colors(stderrOS.has_colors()). I wrote that single-line function but in hindsight it doesn't provide much value.