swh_hostname: Fix fqdn computation
Prior to this commit, the fqdn computation stanza was broken. A return
statement (~ side-effect) within a "foreach" instruction cannot work in ruby.
Use functional approach (filter and select the first result if any). If a
domain is filtered, so great we do as before, use the fqdn as internal_fqdn.
Otherwise, fallback as before to the default domain (.internal.s.o as
internal_fqdn).
Related D1779