Support UTF8<=>Unicode filename mapping
Replaces all file functions with wrappers to their W equivlanets, removing
the need for all A functions.
This means full support for all paths, including paths that contain
characters outside the 8-bit locale, which used to fail.
utf8-to-unicode is handled by utf8_to_wchar, which has 4 static buffers it
rotates. We need at least 2 for symlink(), rename() etc, so we use 4 to be
on the safe side.
unicode-to-utf8 is handled by our own version of wcstombs(). For all calls
where we need unicode-to-utf8, the destination buffer is passed from the
original caller, so we use that directly.
Replaces GetFileAttributes in lstat() with the slightly faster
FindFirstFile, which also makes the symlink handling much cleaner.