Improve reporting

Make Logger, UsageReport and exception reporting more thread safe. For details see commit messages.
Are there any non-white-space changes in this block?