Hosts element: Use 'markers' for updating hosts

This should prevent writing duplicates to /etc/hosts and also
preserve the entries when cloudinit runs on reboot since they are
present in /etc/cloud/templates/hosts.tmpl.

Closes-Bug: #1333649

Change-Id: Icabdb423b16eb143a5ab6f62084d01e8fd4ac384
Merge "Hosts element: Use 'markers' for updating hosts"