gh-161821: Fall back to lld for Clang LTO builds (gh-161822)

Clang LTO with a GNU linker needs the LLVMgold.so plugin, which some
packages (e.g. LLVM for Debian 13) don't ship.  When using Clang with
--with-lto on non-macOS platforms, configure now test-links an LTO
program and, if that fails, retries with -fuse-ld=lld.
4 files changed