Follow-up PR for #18533 -- another small step towards getting rid of the confusing "command" terminology. Also see PR #18610 which tackled the functional tests.
Backport of core PR18937.
Depends on D8460.
The change to process_messages.cpp is not ported as this PR is
deliberately ported out of order. The process_messages fuzzer was added
in D8376 and reverted because it caused a TSAN failure; this diff is a
dependency for the fix.