[master] Support for rolling logs

This replaces #3009 that was messed up. 

Adds support for rolling logs. When the log is rolled over diagnostics information is added to the top of the new log.

It might be that we want store migration to be printed to `system.out`, think about when doing store migration as part of starting the server... I think its progress is expected to be printed there in the console. Perhaps have a "tee" logging for this?