Migrates usage of local storage to IndexedDB.
Benefits:
- Higher storage allowance (5MiB vs unlimited?)
- Does not block main thread
- Data loss prevention on schema update with Dexie's handlers
I also abstracted the logic a bit and made things more predictable. This
enables, for example, independent conversation load states.
Also add Structured output, including a form mode!
https://github.com/user-attachments/assets/459846fe-d03c-41e0-907e-4cf7bad70b4e