This implements `&dedup` and `&newest-first` options for
`edit:command-history`. This makes it noticably cheaper to feed unique
command history into external commands like `fzf`.
Related #1053Fixes#568
- Organize code around two interfaces, Store and Cursor.
- Ensure that a session store is always available, even if the DB is not
accessible.
This fixes#909.