Migrate HostsFile code into its own class

The HostsFile module was being included in 4 different places and with a few instance variable dependencies in each instance.  This moves all the logic into its own class, where the dependencies have to be explicitly passed into the initializer.

This should make it easier to further refactor the HostsFile logic (now in the Updater class), decoupling it slightly from the outside world.