Improved logic for flush_state_to_disk
Right now the flush_state_to_disk() task runs every 60 seconds; instead it should only run when there are real changes in the state to flush, like C Tor does. It should probably also have some mechanism to tell how urgent these state changes are.
It should probably also have some mechanism to behavior differently when it's in read-only mode (see #83 (closed)).