KRecentDocument is used by KIO::ApplicationLauncherJob (and others) to write down the list of Plasma-global recently opened files/URLs. KActivitiesStats watches that file.
The only problem with that move is the use of KIO::iconNameForUrl(url) to write the icon into the file. We could just take it as argument.
Do we wait until KF6, or come up with a new name and write the new class already? In KConfig? (or in KCoreAddons, using QSettings)?
Also an opportunity to move the data to the "state" directory (KSharedConfig()::openStateConfig(), if using KConfig).