Introduce max_id_ever_seen state

Work in progress. We now use it, but it isn't computed yet.
we need to remove this table in the `command_clean_state()` function, which we don't do. yet.

If we had decent persistent variables, i wouldn't be writing this comment.