Fix overlapping memcpy() in WDL_PtrList::Delete()

The memmove() function must be used when memory ranges overlap.  Some C
standard library implementations take advantage of this constraint and
the data can be corrupted if memcpy() is used.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Drop format=xml from JammrUserLookup HTTP request

The jammr REST API has been using JSON for some time now.  The
format=xml query argument was a left-over from the old XML REST API.
Luckily the new REST API always emits JSON so this never caused
problems.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Use QDir::mkdir() in NJClient::SetWorkDir()

Instead of using CreateDirectory() on Windows and mkdir(2) on POSIX, use
QDir::mkdir().

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Use QFile::remove() in DecodeState::~DecodeState()

Instead of using DeleteFile() on Windows and remove(3) on POSIX, use
QFile::remove().

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Drop DebugOutputString() call in NJClient

DebugOutputString() takes wide characters in -DUNICODE builds where this
fails to compile.  Since this debug output is not used much just drop
it.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Use QDir::mkdir() in User_Group::SetLogDir()

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Add utf8_fopen() wrapper for Unicode paths on Windows

Windows fopen() works in the local encoding.  Since we work in UTF-8
internally the fopen() calls are currently breaking on Windows,
depending on the local encoding and the path.

Use a wrapper that calls the wide-character fopen() function on Windows.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Build with -DUNICODE on Windows

Now that Unicode issues on Windows have been resolved, use the
wide-character APIs.  Previous patches have mostly moved to Qt file I/O
functions that hide this.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>