Allow invalidated archive data to be used until they are re-processed

Added DONE_INVALIDATED flag to archiving and considering it when fetching archives
in this query what we want to select is archives that have been invalidated and **then** have been reprocessed already. so maybe we need to a clause : `AND t1.ts_archived < t2.ts_archived`  ?