valid_name: use trust-dns-resolver

Instead of assuming things about the host environment (namely that a
binary named `host` exists on the machine and uses BIND's API), run the
DNS query from Rust directly.

Fixes: #47
21 jobs for remove-host-req in 7 minutes and 35 seconds (queued for 4 seconds)
latest
Status Job ID Name Coverage
  Prepare
passed #4681133
linux rust docker ghostflow
prepare:cargo-cache-mindeps

00:00:51

passed #4681132
linux rust docker ghostflow
prepare:cargo-cache-newest

00:00:52

passed #4681134
linux rust docker ghostflow
prepare:git

00:04:02

 
  Build
failed #4681135
linux rust docker ghostflow
build:cargo-clippy

00:01:04

failed #4681136
linux rust docker ghostflow
build:cargo-clippy-features

00:01:04

failed #4681140
linux rust docker ghostflow
build:cargo-mindeps

00:00:26

failed #4681143
linux rust docker ghostflow
build:cargo-mindeps-features

00:00:28

passed #4681137
linux rust docker ghostflow
build:cargo-minimum

00:02:42

failed #4681141
linux rust docker ghostflow
build:cargo-minimum-features

00:00:48

passed #4681139
linux rust docker ghostflow
build:cargo-nightly

00:02:30

passed #4681138
linux rust docker ghostflow
build:cargo-stable

00:02:13

passed #4681142
linux rust docker ghostflow
build:cargo-stable-features

00:02:50

 
  Test
skipped #4681147
linux rust docker ghostflow
test:cargo-mindeps
skipped #4681150
linux rust docker ghostflow
test:cargo-mindeps-features
passed #4681144
linux rust docker ghostflow
test:cargo-minimum

00:00:41

skipped #4681148
linux rust docker ghostflow
test:cargo-minimum-features
passed #4681146
linux rust docker ghostflow
test:cargo-nightly

00:00:46

passed #4681145
linux rust docker ghostflow
test:cargo-stable

00:00:41

passed #4681149
linux rust docker ghostflow
test:cargo-stable-features

00:00:40

passed #4681151
linux rust docker ghostflow
test:git-master

00:00:41

 
  External
passed ghostflow-check-master

 
Name Stage Failure
failed
build:cargo-minimum-features Build

error: aborting due to previous error

For more information about this error, try `rustc --explain E0658`.
error: Could not compile `git-checks`.

Caused by:
process didn't exit successfully: `/builds/ben.boeckel/rust-git-checks/.gitlab/sccache rustc --crate-name git_checks git-checks/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 --cfg 'feature="config"' --cfg 'feature="default"' --cfg 'feature="git-checks-config"' --cfg 'feature="inventory"' --cfg 'feature="serde"' --cfg 'feature="serde_derive"' -C metadata=037ca4278e9d1654 -C extra-filename=-037ca4278e9d1654 --out-dir /builds/ben.boeckel/rust-git-checks/target/debug/deps -C incremental=/builds/ben.boeckel/rust-git-checks/target/debug/incremental -L dependency=/builds/ben.boeckel/rust-git-checks/target/debug/deps --extern derive_builder=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libderive_builder-108d464d0e1d3ca6.so --extern git_checks_config=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_checks_config-2c8189265dc37877.rmeta --extern git_checks_core=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_checks_core-a354cd60f3b5ef26.rmeta --extern git_workarea=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_workarea-9ebdd1ec751425dc.rmeta --extern inventory=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libinventory-f8e4ee7d933bff27.rmeta --extern itertools=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libitertools-13ad2253847cbf92.rmeta --extern lazy_static=/builds/ben.boeckel/rust-git-checks/target/debug/deps/liblazy_static-7922a50aaedb46ea.rmeta --extern log=/builds/ben.boeckel/rust-git-checks/target/debug/deps/liblog-de014d80b8a2ffe4.rmeta --extern rayon=/builds/ben.boeckel/rust-git-checks/target/debug/deps/librayon-02752c1212289455.rmeta --extern regex=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libregex-18d874d9a4c68c7f.rmeta --extern serde=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libserde-a305e5077d0baa44.rmeta --extern serde_derive=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libserde_derive-8c77cb44c00646c7.so --extern thiserror=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libthiserror-e65934d3f11fcef2.rmeta --extern trust_dns_resolver=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libtrust_dns_resolver-f21be8da7b2a9180.rmeta --extern ttl_cache=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libttl_cache-714a2f59e3a72d9b.rmeta --extern wait_timeout=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libwait_timeout-a7f3f0f23a5ab23f.rmeta -L native=/builds/ben.boeckel/rust-git-checks/target/debug/build/backtrace-sys-09a02a191b461122/out` (exit code: 1)
ERROR: Job failed: exit code 1
failed
build:cargo-mindeps-features Build

For more information about this error, try `rustc --explain E0407`.
error: Could not compile `rand_isaac`.

Caused by:
process didn't exit successfully: `/builds/ben.boeckel/rust-git-checks/.gitlab/sccache rustc --crate-name rand_isaac /builds/ben.boeckel/rust-git-checks/vendor/rand_isaac/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=22722068e29e845c -C extra-filename=-22722068e29e845c --out-dir /builds/ben.boeckel/rust-git-checks/target/debug/deps -L dependency=/builds/ben.boeckel/rust-git-checks/target/debug/deps --extern rand_core=/builds/ben.boeckel/rust-git-checks/target/debug/deps/librand_core-77d2c001e9a69ffd.rmeta --cap-lints allow` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed
ERROR: Job failed: exit code 1
failed
build:cargo-mindeps Build

For more information about this error, try `rustc --explain E0407`.
error: could not compile `rand_isaac`.

Caused by:
process didn't exit successfully: `/builds/ben.boeckel/rust-git-checks/.gitlab/sccache rustc --crate-name rand_isaac /builds/ben.boeckel/rust-git-checks/vendor/rand_isaac/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=8c9b2327bec06bee -C extra-filename=-8c9b2327bec06bee --out-dir /builds/ben.boeckel/rust-git-checks/target/debug/deps -L dependency=/builds/ben.boeckel/rust-git-checks/target/debug/deps --extern rand_core=/builds/ben.boeckel/rust-git-checks/target/debug/deps/librand_core-36b4df32d7eae430.rmeta --cap-lints allow` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed
ERROR: Job failed: exit code 1
failed
build:cargo-clippy-features Build
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

error: aborting due to previous error

error: could not compile `git-checks`.

Caused by:
process didn't exit successfully: `/usr/local/rustup/toolchains/1.39.0-x86_64-unknown-linux-gnu/bin/clippy-driver rustc --crate-name git_checks git-checks/src/lib.rs --color never --emit=dep-info,metadata -C debuginfo=2 --test --cfg 'feature="config"' --cfg 'feature="default"' --cfg 'feature="git-checks-config"' --cfg 'feature="inventory"' --cfg 'feature="serde"' --cfg 'feature="serde_derive"' -C metadata=056cb2d3dc54d22e -C extra-filename=-056cb2d3dc54d22e --out-dir /builds/ben.boeckel/rust-git-checks/target/debug/deps -C incremental=/builds/ben.boeckel/rust-git-checks/target/debug/incremental -L dependency=/builds/ben.boeckel/rust-git-checks/target/debug/deps --extern derive_builder=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libderive_builder-7963c35d94d43d0b.so --extern git_checks_config=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_checks_config-68ad45549aa68909.rmeta --extern git_checks_core=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_checks_core-95be6f44d8286689.rmeta --extern git_workarea=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_workarea-2d261eccb61c0e0e.rmeta --extern inventory=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libinventory-316f9c052cdeda3e.rmeta --extern itertools=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libitertools-64e1c996f7f1491d.rmeta --extern lazy_static=/builds/ben.boeckel/rust-git-checks/target/debug/deps/liblazy_static-9a2a53b9d6382272.rmeta --extern log=/builds/ben.boeckel/rust-git-checks/target/debug/deps/liblog-695cbc620606e6ec.rmeta --extern rayon=/builds/ben.boeckel/rust-git-checks/target/debug/deps/librayon-d71873cea0980498.rmeta --extern regex=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libregex-7669b0aaee6fba14.rmeta --extern serde=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libserde-f637c9b943eb3cdc.rmeta --extern serde_derive=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libserde_derive-f1221d3f200dd2b2.so --extern serde_json=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libserde_json-a435dac52afbd551.rmeta --extern tempdir=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libtempdir-2bf9aee50890aace.rmeta --extern thiserror=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libthiserror-207571901308be12.rmeta --extern trust_dns_resolver=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libtrust_dns_resolver-9d4edd9f605668f6.rmeta --extern ttl_cache=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libttl_cache-52e3e03dd32c3264.rmeta --extern wait_timeout=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libwait_timeout-bd3be2e5ee0e89b6.rmeta -L native=/builds/ben.boeckel/rust-git-checks/target/debug/build/backtrace-sys-c574356c5e6d859d/out` (exit code: 1)
ERROR: Job failed: exit code 1
failed
build:cargo-clippy Build
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy

error: aborting due to previous error

error: could not compile `git-checks`.

Caused by:
process didn't exit successfully: `/usr/local/rustup/toolchains/1.39.0-x86_64-unknown-linux-gnu/bin/clippy-driver rustc --crate-name git_checks git-checks/src/lib.rs --color never --emit=dep-info,metadata -C debuginfo=2 --test --cfg 'feature="default"' -C metadata=2fc74dc0d048ee96 -C extra-filename=-2fc74dc0d048ee96 --out-dir /builds/ben.boeckel/rust-git-checks/target/debug/deps -C incremental=/builds/ben.boeckel/rust-git-checks/target/debug/incremental -L dependency=/builds/ben.boeckel/rust-git-checks/target/debug/deps --extern derive_builder=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libderive_builder-7963c35d94d43d0b.so --extern git_checks_core=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_checks_core-95be6f44d8286689.rmeta --extern git_workarea=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_workarea-2d261eccb61c0e0e.rmeta --extern itertools=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libitertools-64e1c996f7f1491d.rmeta --extern lazy_static=/builds/ben.boeckel/rust-git-checks/target/debug/deps/liblazy_static-9a2a53b9d6382272.rmeta --extern log=/builds/ben.boeckel/rust-git-checks/target/debug/deps/liblog-695cbc620606e6ec.rmeta --extern rayon=/builds/ben.boeckel/rust-git-checks/target/debug/deps/librayon-d71873cea0980498.rmeta --extern regex=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libregex-7669b0aaee6fba14.rmeta --extern serde_json=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libserde_json-a435dac52afbd551.rmeta --extern tempdir=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libtempdir-2bf9aee50890aace.rmeta --extern thiserror=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libthiserror-207571901308be12.rmeta --extern trust_dns_resolver=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libtrust_dns_resolver-9d4edd9f605668f6.rmeta --extern ttl_cache=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libttl_cache-52e3e03dd32c3264.rmeta --extern wait_timeout=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libwait_timeout-bd3be2e5ee0e89b6.rmeta -L native=/builds/ben.boeckel/rust-git-checks/target/debug/build/backtrace-sys-c574356c5e6d859d/out` (exit code: 1)
ERROR: Job failed: exit code 1