READ COMMENT: Simplify and fix tests for `salt.modules.hosts`.

**ATTENTION**: I'm sorting the hosts before writing the hosts back to the file. Let me know if this is a problem so I can switch it.