Features and bug fixes

Numerous changes. Main highlights:
- Support for multiple clients via System V semaphores
- Tweaked timeouts
- Small visual changes to logging
- Client restart feature added
- More robust exception handling - trying to avoid situations when a thread would die to an exception. Should avoid crashes and handle exceptions in a different way.
- Multiple bug fixes