fixup: expiry callback instead of sleeps

This is more invasive to MDLog, but makes the
flush procedure simpler and more deterministic.