FIX: quote `get_user_shell()` in `mkfs()`
FIX: alias_name in `get_user_shell()` in `snapshot()`
Refactor: move common Database code to sql.*
API adaptions for CatalogDatabase
Refactor: HistoryDatabase inherits from Database<>
API adaptions for HistoryDatabase