Switch to incremental vaccuum in places run_maintenance()
Places has a run_maintenance() function, which is intended to be called during idle time. It should finish in a relatively quick time in order to not block places queries in case the user starts actively using FF again.
One part of the maintenance is running VACUUM. We can lessen the worst-case time to execute this by switching to an incremental vacuum approach that only tries to free N pages at a time. This requires setting PRAGMA auto_vacuum=incremental, then running a full VACUUM.
Is this a good idea? I'm not really sure either way. Limiting the vacuum step to N pages is good, but if we're regularly calling run_maintenance() then maybe a full vacuum would only need to operate on a few pages anyways. This might not be true for the first vacuum, but we need to run a full vacuum to enable auto_vacuum=incremental anyways. Also, the SQLite docs say that auto_vacuum=incremental means storing extra information on each page, which is counterproductive to the goal of reducing disk storage. However, it's unclear exactly how much space is needed and it might be a trivial amount.
┆Issue is synchronized with this Jira Task