Add a way to set/reset an image to/from the cache.
Add local_copy field into images table.
Write the local copy status into the database.

Also update the cache.
Display the local status into the metadata module.
Add a white circle on the image box in the ligttable area for local copies.

This is a simple marker to see what are the images having local copy
or not.
Do not create local copy for local files.