fn mdns_hostname(os_hostname: &str) -> StringExpand description
Normalize an OS hostname into a valid mDNS host name by appending the
.local. suffix that mdns-sd’s ServiceInfo::new requires. Idempotent
— already-normalized inputs pass through unchanged. We also strip any
trailing dot first so "foo.local" doesn’t end up as "foo.local..local.".