Limit skipped_ids to 1000 IDs
To avoid the list of skipped revision IDs growing infinitely, truncate
it to 1000 elements each time we load it, after sorting it in reverse
order to make sure the IDs we discard are the oldest ones. The 1000 is
just a wild guess, and probably overly generous – we could probably tone
it down somewhat (though 100 might be too little) if it turns out
storing that much data in the session is a problem.