According to the SunOS man page on flock:

	flock() applies or removes an advisory lock on the file associ-
     ated with the file descriptor fd. The compatibility version of
     flock() has been implemented on top of fcntl(2) locking.  It does
     not provide complete binary compatibility

This lack of binary compatibility results in some odd behavior when
running salt-master on a SunOS/SmartOS host. Specifically an IOError
[Errno 9] is thrown whenever the master calls the file_hash method.

Specifically it has to do with the fact that on SunOS/SmartOS the lock
is released when the file is closed,  whereas in Linux the lock is kept
until it is released. An article discussing the problem in detail can be
found here:

http://infinitesque.net/articles/2010/on%20Python%20flock/index.html

To get this working I changed salt/fileserver/roots.py to check os.uname()
to make sure it's not a SunOS host when setting HAS_FCNTL. Comments indicate
Windows shouldn't have this set either.
Merge pull request #10219 from nshalman/fix-solaris-fcntl-0.17

cherry-pick #10093 onto 0.17 branch
Remove process.join()

This caused the windows minion to block
catch NameError because of Windows
add more namespaced modules for windows
Remove unused imports
add missing imports
use two spaces before inline comment

Keep pylint happy
properly namespace win_file.remove

fixes #10233
namespace win_file.append

fixes #10233
Ignore unused import.
read and write binary with msgpack

Conflicts:
	salt/modules/state.py
write to repo file in binary for msgpack
read repo file as binary for msgpack
write msgpack as binary
read and write data in binary for msgpack
use single quotes
more read/write in binary w/msgpack

Conflicts:
	salt/master.py
read/write in binary w/msgpack
read/write binary w/msgpack