Bail-out early if dig fails to finish successfully or takes too long
Before, the zero system test could get stuck almost infinitely, because the first test sends > 300 queries with 5 seconds timeout on each in each pass. If named crashed early, it would took the test more than 4 hours to properly timeout.
This commit introduces a "watchdog" on the dig commands running in the background and failing the test on timeout, failing any test if any dig command fails to return successfully, and making the tests.sh script shellcheck clean.
Closes #1453 (closed)