Completely refactored inventory-hosts

No longer completely rewriting /etc/hosts, only applying incremental changes.