Flushes `memtable` to a new SSTable file under `dir/ / .sstable`. Entries are written in the sorted order of the MemTable. The offset of each entry is recorded so that [`get`](SSTable::get) can binary search without a full file scan.
(memtable: &MemTable, level: usize, dir: &Path)