Fix some compiler warnings and fix windows build.
Some more fixes for windows build.
More fixes for windows build.
Bugfixes in the uninstall and install scripts

Signed-off-by: Marco van Wieringen <marco.van.wieringen@bareos.com>
Restore of encrypted data fails when not all files are created.

We should check if a file is actually extracted when checking
if we encounter an unexpected STREAM_ENCRYPTED_SESSION_DATA.
The rctx.cs is setup by a call to crypto_session_decode()
and that session lingers until its teared down by
close_previous_stream() but that only occurs when the next
file is actually extracted. So if we extract one encrypted
file and not the one after that the rctx.cs will not be cleared
until we hit the next extracted file or the end of the restore.
So we should only handle the session at all when we extract
the file as otherwise it makes absolutely no sense to even
consider the encrypted session data stream at all as we will
be skipping the file extract anyway and skip all encrypted data
blocks.

Fixes #192: Restore of PKI encrypted data fails if some of the files
            should not be replaced