Clean up the Logger SLOG functionality

As an artifact of the threads branch the logger was left in a state
where large number of sstream objects were being created on the heap
and not cleaned up until the end.

Worse, on some platforms (notably windows, but also some RHEL systems)
this could cause a seg-fault after main has returned and the program is
being unwound.