[Fixes #52118601] Convert /etc/hosts to a template

Convert to a template to ensure correct order. Also:

1. Warn if `$::fqdn` is missing.
1. Add a missing IPv6 entry from stock Ubuntu.

/cc @nickstenning