Added timed compacting function to journal. The function is disabled by default.