multiple bugfixes:

> --synctimeout=0 disables the timeout
> fixed 2 memleak situations
> fixed thread manager's data corruption
> fixed signal handeling
few another problems fixes