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 don't disagree with functional tests.  It's just that wholesale duplication of the config and setup files is not necessary.  Just add a testsuite for them:
```xml
<testsuite name="functional">
    <dir suffix="Test.php">dbtests</dir>
</testsuite>
```