Reimplement the gnutls-cli check in Python
gnutls-cli is tricky to script around as it immediately closes the server connection when its standard input is closed. This prevents simple shell-based I/O redirection from being used for capturing the DNS response sent over a TLS connection and the workarounds for this issue employ non-standard utilities like "timeout".
Instead of resorting to clever shell hacks, reimplement the relevant check in Python. Exit immediately upon receiving a valid DNS response or when gnutls-cli exits in order to decrease the test's run time. Employ dnspython to avoid the need for storing DNS queries in binary files and to improve test readability. Capture more diagnostic output to facilitate troubleshooting. Use a pytest fixture instead of an Autoconf macro to keep test requirements localized.
Closes #3099 (closed)