Syncs the database; this flushes all
eventual caches and frees all unused blocks.
sync() can only be called when there is no
ongoing transactions. sync_please() sets
a marker that the database should be synced
when the last transaction is finished or cancelled,
which will eventually sync the database.
The usage could be in a call_out-loop,
[...]
call_out(sync_the_database,5*60);
[...]
void sync_the_database()
{
call_out(sync_please,5*60);
my_mird->sync_please();
}