message: Add CONFIGURE_LOG mode to record a message in the configure log

Provide a replacement for `file(APPEND .../CMake{Output,Error}.log)`
that records messages in the configure log.

Issue: #23200
13 files changed