Modules: track shared dict state changes per worker
With frequent changes to a shared dict zone using state=, old workers
can remain in shutting down after a configuration reload and continue
consuming resources even though their changes have already been included
in another worker's snapshot. The shared dirty flag cannot distinguish
those changes from subsequent changes made by new workers, so old
workers can keep rearming their save timers while competing for writes.
Replace the shared dirty flag with a write_id counter and record its
value locally in each worker on mutation. Advance the shared counter
after preparing a snapshot so workers whose changes are covered can
stop retrying regardless of subsequent mutations. On I/O failure, the
writer records the advanced counter locally to retain responsibility
for retrying the save.