First to approach the bug.
Prolog: fixing bug #2057.
Added log warning with exception. Replaced copy-pasted code, which fixes #2057, with function. Disabled incorrectly working code to re-establish SQL process on unexpected failure.
Merge branch 'develop' of github.com:Starcounter/Starcounter into PrologBug