Adjusted the symlink reparse point detection code to be more specific.

The first and third bits, the 'microsoft' bit and 'name surrogate' bit respectively, are now checked as well. The docs aren't definitive on this, but this meshes up with the definition in winnt.h so it should be right.
Made function for identifying if a file is a symlink a public module function.

This is necessary so the file module can be used on *nix and Windows in the same way.
Changed so reparse point data can be accessed for non-exclusively opened files.
Changed the error message slightly so it is obvious the value is hex.
Updated win_file.get_user to match the *nix equivalent semantics and behaviour.
Updated win_file so it is at parity with the *nix version where possible.

There could be some breaking changes in here, including:
* the broken sed, sed_contains, patch, uncomment, comment functions were removed (sed and patch executables don't exist on Windows by default)
* follow_symlinks functionality was added where applicable and made to comply with *nix behaviour
* return values were changed to match *nix behaviour
* the stats function now includes user and group details
* get_group and get_gid now actually return the group, not the user as it previously did
Added file.lchown so Salt can use a different implementation for Windows.
Reverted behaviour of 'group' functions to return the user instead.

The rationale behind this is because the 'group' property of a file generally isn't used on Windows, therefore this will prevent the user from performing something they don't intend, particularly when the actions have been abstracted at the states level.

If they actually want to access/manipulate the 'group' property, alternate functions/parameters are provided.
Removed incomplete doctext.
Fixed stat so it maintains the illusion needed for win_file to be compatible with *nix file module functions.
Changed file state module so it uses platform-specific module functions.

Also updated docs and fixed states so they work on Windows as well by ignoring the group arg.
Grrr, used the wrong format for log strings.
Added code to enable then disable the SE_RESTORE_NAME privilege so files can be chown'ed on Windows.
Fixed the disabling of a privilege so it actually works.

Also stopped a privilege from being disabled if it wasn't enabled properly - this stops the original enabling exception from being possibly masked when disabling.
Oops, implemented the reverse logic instead.
Forgot to remove the import for file.* module functions not applicable to Windows.
Finally sorted out the logic for adjusting privileges, I think.

This covers situations where a privilege already in the requested state is being re-requested, and also situations where the process doesn't have the requested privilege.

Also handle is now closed as required by the API.
Fixed some PEP8 issues and also added log hint for subbed in return values.
Fixed get_pgroup so it actually works as documented.
Added missing imports and improved docs.