Fix access to files with long file names on win32/win64
Long path were already handled with a prefix '\\?\' thanks to ALLOC_WIN32_PATH macro defined in platforms/win32/plugins/FilePlugin/sqWin32File.h
Unfortunately, when concatenating a file path shorter than MAX_PATH with a file name making the total longer than MAX_PATH,
using the macro REALLOC_WIN32_PATH, there were no '\\?\' prepended, and the file access did fail...
This commit does fix the REALLOC_WIN32_PATH to handle the case when path become longer than limit after growth.
Fix the win32 long path name realloc fix:
1) put the 32767 protection into the REALLOC_WIN32_PATH macro
2) correct the size of alloca when we prepend path with \\?\ (alloca is forgiving, but let's not create future hard to find bugs!)
3) correct the offset where we were copying the filename part which did not take 4 prepended char into account
Fix win32 long path name with a simpler solution a la Esteban
Having two macros ALLOC_WIN32_PATH and REALLOC_WIN32_PATH that do almost the same thing smells.
It is a lot simpler to concatenate native utf8 path and file names, then call ALLOC_WIN32_PATH once
like Esteban Lorenzano did propose, rather than doing the work on converted WCHAR win32Path.
Some more details:
The concatenated fullPath does not require a trailing null char because MultiByteToWideChar() invoked by ALLOC_WIN32_PATH cares of it
The lastString cache is now handled in utf8 too, without trailing null either- hence we don't use strcmp()