Fixed major bug in StratumMiner which was causing miners to get disconnected regularly

Fixes #350.
Also includes an exception handler for log-manager.