CHANGE-709 - Refactor logging infrastructure (continuation)

CHANGE-709 - Refactor logging infrastructure (continuation from earlier changes)
- fix chicken/egg problem with log initialization
- add explicit logging messages in more places
- relocate log-delete code to logwriter
<a href='#crh-start'></a><a href='#crh-data-
I'd mock the `queryFactory`, or at least add a stub to eliminate the dependency on a live db for testing and speed tests up.