formatting: capture stderr for the error path with a timeout
This is only used in logs, so it is not covered by the test suite. It improves the logs that we see when a timeout-based command fails:
failed to run the clang-format formatting command: failed with exit code Some(3), signal None