Creates a new Database instance.
If the file exists and is non-empty, the database is restored from the file into memory. Otherwise, a new in-memory database is created.
| filename |
The path to the database file for backup/restore |
| autosave |
Whether to automatically save periodically (default: false) |