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

Added DONE_INVALIDATED flag to archiving and considering it when fetching archives
I try to make sure the invalidated archive has a newer version that is valid. This is not required as it is impossible when the t1/t2.value requirement is met but it should work a bit faster when working on idarchive. I'll check if it is true and if not I'll delete this part.