remove any trailing comments in hosts file lines, fixing issue with GCE

When using the hosts module for Google Compute Engine it is not possible to modify the nodes own entry, because Google adds a trainling comment. Example below

[snip]
10.240.178.205 gc-attivio-ie01.c.foo-matching-prod.internal gc-attivio-ie01  # Added by Google
[snap]

Adding a second name to this line ends up with the name appended after the comment and rendering the entry useless. This patch should fix the issue.