Fix minor bug in opportunist user relationship lookup.
Same flag checked twice.
Fix wrong variable being displayed in filter JIT debug logging.
Only keep cumulative compression totals when copious logging enabled.
Various minor misc/style changes:
removing C-style pointer casts, whitespace, using nullptr more,
using more range-based loops, minor const changes, a few variable
rescopings, minor initialisation changes in a few cases.
Remove setting persistentmediacache (Check incoming media against cache).
Turning it off makes little sense, and requires significant additional
DB-handling code, which can now be removed.
It is now effectively permanently enabled.
Refactor media entity creation and name lookup.
De-duplicate and simplify some of the code for new entries.
Maintain a timestamp of when each media cache is last used.
Bump DB version to add timestamp column to mediacache table.
Only do DB version check if DB is not new.
If DB is new, just write the version number.
The DB is "new" if it has no tables.
Move settings accid fix and add clear tweet medialists to v1 DB update.