fix: restore inline frecency function in Electron backend
The cross-boundary import from app/lib/frecency.js doesn't work at
runtime because the TS compiler outputs to dist/backend/ which doesn't
include app/lib/. Restore the inline function with a comment pointing
to the shared copy.