main read the environment through closures built inline and held the
per-request admission and answer inside the receive loop, so none of it
could run in a test. Each is now a function:
- env_var and env_number read through a lookup closure in place of
std::env, and main wraps std::env::var.
- request_agent, admit and respond hold the admission and the answer of
one request; answer takes any Engine instead of Whisper.
- stored_value holds the check on the stored client secret.
Tests run settings, admission and answers against a fake engine.
Closes#6811