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
14 jobs for remove-host-req in 7 minutes and 19 seconds (queued for 2 seconds)
Status Job ID Name Coverage
  Prepare
passed #4651622
linux rust docker ghostflow
prepare:cargo-cache-mindeps

00:00:54

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

00:00:59

passed #4651623
linux rust docker ghostflow
prepare:git

00:03:56

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

00:01:03

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

00:00:02

failed #4651625
linux rust docker ghostflow
build:cargo-minimum

00:00:00

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

00:03:05

failed #4651626
linux rust docker ghostflow
build:cargo-stable

00:00:43

 
  Test
skipped #4651632
linux rust docker ghostflow
test:cargo-mindeps
skipped #4651629
linux rust docker ghostflow
test:cargo-minimum
passed #4651631
linux rust docker ghostflow
test:cargo-nightly

00:00:48

skipped #4651630
linux rust docker ghostflow
test:cargo-stable
skipped #4651633
linux rust docker ghostflow
test:git-master
 
  External
passed ghostflow-check-master

 
Name Stage Failure
failed
build:cargo-mindeps Build
Running with gitlab-runner 11.11.4 (e828d3bc)
on dovim.shared u7A_EcbV
Using Docker executor with image rust:1.39.0 ...
Pulling docker image rust:1.39.0 ...
ERROR: Job failed: Error response from daemon: manifest for rust:1.39.0 not found (executor_docker.go:175:0s)
failed
build:cargo-stable Build

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

Caused by:
process didn't exit successfully: `rustc --crate-name git_checks git-checks/src/lib.rs --color never --crate-type lib --emit=dep-info,metadata,link -C debuginfo=2 -C metadata=362d697f71e5cd50 -C extra-filename=-362d697f71e5cd50 --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 git_checks_core=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_checks_core-d09be2def7d9337a.rmeta --extern git_workarea=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_workarea-1e640ad67c433fdb.rmeta --extern itertools=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libitertools-2b0decdcd35e5f21.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-49987974e1d33415.rmeta --extern regex=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libregex-18d874d9a4c68c7f.rmeta --extern thiserror=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libthiserror-045405b93c5b0f82.rmeta --extern trust_dns_resolver=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libtrust_dns_resolver-3186afa12306585e.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-c60de77a02fad143.rmeta -L native=/builds/ben.boeckel/rust-git-checks/target/debug/build/backtrace-sys-8dfeb0d68c577774/out` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed
ERROR: Job failed: exit code 1
failed
build:cargo-minimum Build
Running with gitlab-runner 11.11.4 (e828d3bc)
on dovim.shared u7A_EcbV
Using Docker executor with image rust:1.39.0 ...
Pulling docker image rust:1.39.0 ...
ERROR: Job failed: Error response from daemon: manifest for rust:1.39.0 not found (executor_docker.go:175:0s)
failed
build:cargo-clippy 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: `/usr/local/rustup/toolchains/1.38.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 -C metadata=f656ec577e417bc1 -C extra-filename=-f656ec577e417bc1 --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 git_checks_core=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_checks_core-ae1feb43e983b30d.rmeta --extern git_workarea=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libgit_workarea-846deb498cbabf30.rmeta --extern itertools=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libitertools-b82ffb72c666b46e.rmeta --extern lazy_static=/builds/ben.boeckel/rust-git-checks/target/debug/deps/liblazy_static-046a0438abc203dc.rmeta --extern log=/builds/ben.boeckel/rust-git-checks/target/debug/deps/liblog-1d28a3816ceeb30d.rmeta --extern rayon=/builds/ben.boeckel/rust-git-checks/target/debug/deps/librayon-3bc746f8a07cc598.rmeta --extern regex=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libregex-0274710253eb4f27.rmeta --extern tempdir=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libtempdir-4eee1b097aef6d07.rmeta --extern thiserror=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libthiserror-1b6fb2badc523dbb.rmeta --extern trust_dns_resolver=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libtrust_dns_resolver-6523aa732af2babc.rmeta --extern ttl_cache=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libttl_cache-35c455161b5001e1.rmeta --extern wait_timeout=/builds/ben.boeckel/rust-git-checks/target/debug/deps/libwait_timeout-c9af8f8bb812510e.rmeta -L native=/builds/ben.boeckel/rust-git-checks/target/debug/build/backtrace-sys-8dfeb0d68c577774/out` (exit code: 1)
ERROR: Job failed: exit code 1