Implement the scan thread for FileLocation.

The scan thread will scan the directory, getting mtimes. If a file
has changed its mtime (or appeared or disappeared), we clear out
the cached slot.