Reset Image.archived flag where necessary (Fix #11810)

During the upgrade testing of nightshade for 5.0.0-beta2-rc3,
images were found which had incorrect `archived`. This won't
prevent the flags from being mis-set again, but for starting
with `5.0__0` it will at least be consistent.
Merge pull request #1899 from joshmoore/11810-archived-sql

Reset Image.archived flag where necessary (Fix #11810)