Add utility function to unshare wxString.
This is because wxString COW is not thread-safe.
Add option to asynchronously flush state to DB at a set interval.
This defaults 30 mins.
Refactor DB state and CFG writeback functions.
Add flush state item to log window debug menu.
Change zlib compression level from 9 to 5.
This is to speed up compressing blocks for DB writes.
Remove BINDCF flags from DB bind_compressed, never used.
Always use sqlite3_bind_blob, instead of using sqlite3_bind_text if it
wasn't actually compressed.
Add versions accepting char* and length.
Do set blob compression in the DB thread.
This is to avoid unnecessarily blocking the main thread when writing
state asynchronously.