host: bug fixes and improvments

Hi

fixed 2 bugs:
* changed was not available if validation failed
* alias was not removed on existing host entry

This should be merged before 1.4 release as this module is new.