Increase checksum noting and matching for imports.

To test make sure that different import/upload paths still work, including archiving during import. For real files in the server's local filesystem, if they have a corresponding entry in the `originalfile` table in the DB then make sure that the SHA1 there is set correctly.