[clangd] Also accept flags from CLANGD_FLAGS variable.

This simplifies various workflows, particularly in debugging/development.
e.g. editors will tend to propagate flags, so you can run
`env CLANGD_FLAGS=-input-mirror-file=/tmp/mirror vim foo.cc` rather than
change the configuration in a persistent way.
(This also gives us a generic lever when we don't know how to customize
the flags in some particular LSP client).

While here, add a test for this and other startup logging, and fix a
couple of direct writes to errs() that should have been logs.

Differential Revision: https://reviews.llvm.org/D65153

git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@366991 91177308-0d34-0410-b5e6-96231b3b80d8
3 files changed