(Maint) Remove whitespace errors
(#20938) Ignore stderr from domain commands

Previously, when the hostname of a system is in a messed up stated, the
hostname and dnsdomainname commands would output warning messages to
stderr. The facter command execution system does not capture this, and
so the stderr output ends up making it all the way out to the caller and
likely to the user, as is the case for puppet when using facter.

This commit takes the simple approach of redirecting the error output to
/dev/null, which should be sufficient for the platforms that use these
commands (non-windows).
(Maint) Remove duplication in domain tests

The tests were full of duplication around what commands would be
executed and how. This works toward removing the duplication and even
combines two tests together to provide a less implementation specific
assertion about the precedence of the resolv.conf data.
Merge pull request #445 from zaphod42/issues/stable/20938-noise-on-stderr-from-domain-fact

(#20938) Ignore stderr from domain commands