Improve logging, and fix logging-related hang when threads are killed while logging
Code review mark-ups
Merge pull request #22 from Metaswitch/logging

[Reviewer: Alex] Improve logging, and fix logging-related hang when threads are killed while logging