[IMPR] Reset counter when "era" changes
This splits the main loop into two ("divide-and-conquer algorithm"):
- The first loop scans the whole page for old threads to be archived and groups them by archive.
- The second loop iterates the groups in order that the archive with the oldest threads goes first. This is the one the saved counter applies to. Any other group resets the counter (if it matters).