This commit fixes a deadlock that could happen if the
UltraGrid process crashed or was killed while it held a lock
to the shared memory segment used for preview.
On Windows this happened often, because Qt can't terminate a QProcess
gracefuly and needs to kill it every time.