Win32: Make sure error messages are consistently UTF-8 encoded

W/o this a libgit2 error message could have a mixed encoding:
e.g. a filename in UTF-8 combined with a native Windows error message
encoded with the local code page.

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Get utf8_size from WideCharToMultiByte instead of guessing it

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Improved error handling

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Deduplicate FormatMessage UTF-16 to UTF-8 conversion code

Signed-off-by: Sven Strickroth <email@cs-ware.de>
Merge pull request #1303 from csware/win32_consistent_error_encoding

Win32: Make sure error messages are consistently UTF-8 encoded