Collapses a burst of calls into a single delayed one.
Each trigger() restarts the timer, so the action runs delayMs after
things go quiet — the right behaviour for saving state after a flurry of
inventory changes, or refreshing a UI while a slider is being dragged.