scenario: factor out socket handling and sending DNS queries to mock_client.py

This is useful for code clarity and for other use-cases other than Deckard.
11 jobs for scenario-refactor in 3 minutes and 35 seconds (queued for 2 seconds)
latest
Status Job ID Name Coverage
  Test
passed #222142
docker linux amd64
test:augeas

00:00:42

passed #222152
docker linux amd64
test:comparative:kresd

00:02:00

passed #222143
docker linux amd64
test:flake8

00:00:34

passed #222149
docker linux amd64
test:latest:kresd

00:01:32

passed #222144
docker linux amd64
test:mypy

00:00:43

passed #222145
docker linux amd64
test:pylint

00:00:39

passed #222146
docker linux amd64
test:rplint

00:00:34

passed #222151
docker linux amd64
test:sanity:pdnsrecursor

00:00:30

passed #222150
docker linux amd64
test:sanity:unbound

00:00:29

passed #222147
docker linux amd64
test:unittests

00:00:35

failed #222148
docker linux amd64
test:comparative:kresd

00:02:13