fix hosts file error in Travis

In a continue to [this error](https://github.com/saltstack/salt/commit/61573b1394c8835e8dccc91db44eeb2f7e843bd0#commitcomment-3967806)

- fixed the aliases loop
- try to fix Travis error - https://travis-ci.org/saltstack/salt/jobs/10730122#L2156

Please review the changes I've done in the tests/integration/modules/hosts.py file,
I'm not 100% sure this is ok.

Thanks