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

Added DONE_INVALIDATED flag to archiving and considering it when fetching archives
 Nicely done. Maybe you could add a comment eg. "Select the archives that have already been invalidated and have been since re-processed. It purges records for each distinct { archive name (includes segment hash) , idsite, date, period } tuple. "