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.
10 jobs for scenario-refactor
in 1 minute and 27 seconds and was queued for 3 seconds