Handle 'localhost' in loopback correctly, add FQDN as ipaddress if requested.

hostsfile cookbook only publishes "last" identical entry. Inserting white space in front of "localhost" entries as needed prevents "::1" localhost entry from flushing "127.0.0.1" localhost entry.

I've also added optional, disabled by default, hooks for recording the external IP address with the hostname.