csync test: fix warning
sync engine: try to respect permission

This is still Work in progress
permission: read them from the tree
Fix regression over 1.5: Fix non-fba auth for Shib IdPs
SyncEngine: Use QSet for the seenFiles rather than QHash.

We can save some memory here as the seenFiles list can be long.
csync_vio_local: fix memory leak on windows
Syncengine:  Wait for the neon thead to be finished before destroying the Propagator and calling csync_commit

The legacy job might still need the neon session and the propagator.
We need to make sure the thread exits before.

This fixes crash when pausing a sync made with the legacy jobs
(for example when there is network limitation)
This should fix https://github.com/owncloud/enterprise/issues/200
Legacy propagator jobs: Do not limit bandwidth when aborting

When aborting, we want the last job to be as fast as possible
as it blocks the UI.  So don't limit the bandwidth in that case
csync_statedb: remove noisy output
csync: fix the size in strncpy for the remote perms

We must only do strncpy with size one smaller than
the size of the buffer in order to leave at least
one '\0' at the end
engine: When restoring the file, use the mtime and fileid from the server

Important to switch the things around as we are going to write them in the DB
TokenCredentials: Fix cookie behaviour

parseCookies did not work as expected. Now we just hard-set the
token credentials into the Cookie header for QNAM jobs.
This is the same behaviour as for neon jobs.

(cherry picked from commit 855a8c0a335f76b82b8e647a8c5a4ae692065d3b)
Fix resource leak in win32 code path, added free of locale filename.

This fixes Coverity CID 12901
Updater: Free tmp variable that might point to temp malloced memory

This fixes Coverity CID 12900
Fix use-after-free in QNAM propagator

This fixes Coverity CID 12929
c_time: Fix resource leak in error case

This fixes Coverity CID 12903
Fix potential memory leak

This fixes Coverity CID 12893
httpbf.c: Fix resource leak

This fixes Coverity CID 12902
statedb.c: fix potential memory leak on win32

This fixes coverity issue 12898
StateDB: Free locale string also if attribs are invalid.

This fixes Coverity CID 12898