pruneProcessedMessages

Removes the tombstones of finalized (committed or discarded) messages whose age (the clock now minus their commit or discard time) is at least ProcessedInboundRetentionPolicy.maxAge, and returns their number (docs/application-delivery.md, docs/message-discard.md). Pending messages are never removed. Entries from before milestone 20 without a commit time are kept until initialize stamps them.

Nothing calls this implicitly. After an entry is removed, committed or discarded, a copy of that message the sender sends later is no longer recognized: it is delivered again as new (unless the ratchet rejects the old ciphertext, which it does for a replayed envelope). The retention uses the wall clock: a clock set back removes less, a clock set forward removes earlier.