sqlite fine tuning

This PR introduces "Advanced" settings tab with currently only one property: selecting sqlite synchronous mode. This somehow resolves intensive disk usage issue mentioned in #512 for COW FS like btrfs. Also this PR slightly improves new message insert execution speed into the DB.
These need `tr()` calls