This task previously read all images file's EXIF data every 60s, which
leads to a very large CPU usage for seaf_fuse.
The obvious fix of checking for modifications times and only read the
change files does not work with seaf_fuse, because stat is not cheaper
than actually opening and reading the file.
So instead, we now only read the file list and the modification time of
the image directory itself and update the image metadata only if there
are changes. We also update the metadata at least once every hour to
detect modified files on normal filesystems.
Interestingly, seaf_fuse will update the mtime of a directory if any file
in that directory is changed, so the logic implemented in this commit
will actually detect image changes with seaf_fuse instantly.
We previously tried to parse the exif datetime as an ISO datetime
string, however the date parse uses colons instead of dashes in exif.
This meant that the modification time was used for every image instead
of the exif date.
Preparing the images list involves reading a directory (which might be
slow on non-local directories) and opening every file to read the exif
data. To avoid having to do this on every request, we do it every 60s in
a background job and only read from the cache on requests.