ui: introduce storage backend and preferences service
Split DatabaseService into pure tree rules (utils/conversation-tree) and a
row-level StorageBackend, with IdbBackend holding the Dexie code. Route
localStorage access through PreferencesService, which also classifies keys
as user data or device-local state. No behaviour change.
Assisted-by: Claude (Opus 5.5 Medium)