common: add ScanTime() and UpdateScanTime(), which are triggered during filesystem scans which change the database