Add test for salt.config.get_id() when /etc/hosts is parsed

This is a WIP, the mocking isn't quite working yet.
Get `mock_open` working.

Kind of since we're not using `mock_open` from the mocked library. Were
actually using the recipe to mock the builtin open as seen on http://goo.gl/dxMwPO
Run windows specific code on windows only!
Test is now fixed.
More concise fix for empty /etc/hosts line check
Add more get_id tests + some DRY fixes
Merge pull request #10724 from terminalmage/tests

Add three tests for minion_id generation