[UserMetaData] Untangle Windows, Linux/BSD/Mac and stub code.
Summary:
The Windows code only shares the function signature with the other
variants, while the actual code is vastly different. One example are
path and attribute names, which are UTF-16 on Windows and UTF-8 otherwise,
but QFile::encodeName() is also called on Windows.
This fixes also two small bugs on Windows, one missing CloseHandle in
case the attribute has a size of 0, and a wrong return value in case
writing the ADS fails.
Test Plan:
Linux: ctest
Windows/Mac/*BSD: untested
Reviewers: Baloo, Frameworks, Windows, FreeBSD, ngraham, astippich
Reviewed By: astippich
Subscribers: adridg, kde-frameworks-devel
Tags: Frameworks, Baloo
Differential Revision: https://phabricator.kde.org/D20133